Example
messages = [
{
"role": "user",
"content": "Implement binary search in Python."
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Hardware Requirements
This repository contains merged BF16 weights.
Memory requirements depend on the selected precision and inference backend.
Users with limited GPU memory are encouraged to use the GGUF release when available.
Limitations
Although specialized for computer science tasks, the model remains a probabilistic language model.
Outputs should be reviewed before use in production environments.
The model may:
- generate incorrect code
- hallucinate APIs or libraries
- produce incomplete implementations
- misunderstand project-specific context
License
This repository is released under the Apache License 2.0.
Base Model
This project is derived from Qwen/Qwen3-4B, which is distributed under the Apache License 2.0.
Training Data
The datasets retain their original licenses.
Table with columns: Dataset, License| Dataset | License |
|---|
| HuggingFaceTB/smoltalk | Apache-2.0 |
| agentica-org/DeepCoder-Preview-Dataset | MIT |
Acknowledgements
This project builds upon the work of:
- Alibaba Qwen Team
- Hugging Face
- HuggingFaceTB
- Agentica
- Unsloth
The contributions of these open-source projects made this work possible.
Citation
@misc{uruci2026qwen3cs,
title={Qwen3-4B-Computer-Science},
author={Irfan Uruçi},
year={2026},
publisher={Hugging Face},
howpublished={https://huggingface.co/Irfanuruchi/Qwen3-4B-Computer-Science}
}
Questions, bug reports, and suggestions are welcome through the Hugging Face repository discussions.