Qwen3.8 4B Distilled
is a 4-billion-parameter reasoning model created by distilling outputs from
Qwen3.8-Max
into the smaller
Qwen3-4B-Thinking-2507
student model.
This is a
Qwen3-architecture student model distilled from Qwen3.8-Max-generated outputs
.
The repository does not claim that the underlying architecture or original weights are from Qwen3.8-Max. Qwen3.8-Max is the teacher whose generated responses and reasoning traces were used as training targets for the 4B student.
This is an independently fine-tuned community model and is not an official Qwen or Alibaba release.
The dataset contains teacher-generated examples across areas including:
Mathematics
Programming
General reasoning
Scientific reasoning
Instruction following
Limited tool use
Teacher responses were generated by
qwen3.8-max-preview
. Visible
<think>...</think>
reasoning traces were retained when present in the dataset.
What “Distilled” Means Here
This model uses
sequence-level knowledge distillation
.
The smaller student was trained on complete responses produced by the larger teacher. This transfers parts of the teacher's behavior, reasoning patterns, solution structure, and response style without copying the teacher's architecture or weights.
Therefore:
The
architecture and original student weights
come from Qwen3-4B-Thinking-2507.
The
distillation targets
come from Qwen3.8-Max-generated outputs.
The resulting checkpoint remains a 4B Qwen3 model.
The model is not expected to reproduce the full capabilities of Qwen3.8-Max.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "Ma7ee7/Qwen3.8_4B_Distilled"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
torch_dtype="auto",
device_map="auto",
)
messages = [
{
"role": "user",
"content": (
"A farmer has 120 meters of fencing and wants to build a ""rectangular enclosure. What dimensions maximize the area?"
),
}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
output_ids = model.generate(
**inputs,
max_new_tokens=4096,
do_sample=True,
temperature=0.6,
top_p=0.95,
top_k=20,
repetition_penalty=1.05,
)
new_tokens = output_ids[0, inputs["input_ids"].shape[-1]:]
response = tokenizer.decode(new_tokens, skip_special_tokens=True)
print(response)
Pipeline Usage
from transformers import pipeline
MODEL_ID = "Ma7ee7/Qwen3.8_4B_Distilled"
generator = pipeline(
task="text-generation",
model=MODEL_ID,
device_map="auto",
torch_dtype="auto",
)
messages = [
{
"role": "user",
"content": "Explain why the square root of 2 is irrational.",
}
]
result = generator(
messages,
max_new_tokens=4096,
do_sample=True,
temperature=0.6,
top_p=0.95,
top_k=20,
repetition_penalty=1.05,
)
print(result[0]["generated_text"])
Recommended Generation Settings
Setting
Recommended value
Temperature
0.6
Top-p
0.95
Top-k
20
Repetition penalty
1.0
–
1.1
Maximum new tokens
4096
or higher
For difficult mathematics, programming, or long-form reasoning, allow enough output tokens for the model to complete both its reasoning and final answer.
Thinking Output
The model inherits a thinking-oriented chat format from Qwen3-4B-Thinking-2507. Depending on the inference application and reasoning parser, visible reasoning may be displayed in a form similar to:
<think>
Reasoning process
</think>
Final answer
Some applications may hide the thinking section or render it separately from the final answer.
This is a 4B student model and does not contain the complete knowledge or capabilities of Qwen3.8-Max.
Distillation transfers patterns from teacher-generated outputs; it does not copy the teacher's architecture or weights.
Teacher-generated answers may contain factual, mathematical, or programming errors.
Visible reasoning traces should not automatically be assumed to be correct.
The model may hallucinate or produce confidently incorrect answers.
Tool-use examples represent only a small portion of the training data.
The training mixture is primarily English.
The training dataset may include prompts derived from common evaluation benchmarks.
Results on overlapping benchmarks should not be treated as uncontaminated evaluations without additional controls.
Outputs should be reviewed before use in high-stakes medical, financial, legal, or security-sensitive settings.
License and Training-Data Notice
This repository is published under the
Apache License 2.0
.
That license does not override any separate licenses, attribution requirements, or usage terms associated with:
The Qwen3 base model
The Qwen3.8-Max teacher provider
The distillation dataset
Upstream datasets from which prompts were sourced
Users are responsible for reviewing the base model license, the distillation dataset card, its provenance documentation, and any applicable upstream terms before use or redistribution.
Acknowledgements
This model builds upon work from:
The Qwen team for Qwen3-4B-Thinking-2507
r0b0tlab
for the Qwen3.8-Max Distillation 50K dataset
Unsloth
Hugging Face Transformers and TRL
Citation
@misc{r0b0tlab2026qwen38distillation50k,
title = {Qwen3.8-Max Distillation 50K},
author = {r0b0tlab},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/r0b0tlab/qwen3.8-max-distillation-50k}}
}
Disclaimer
Qwen3.8 4B Distilled
is an independent community fine-tune by Ma7ee7.
It is not produced, endorsed, or officially released by the Qwen team, Alibaba, or Alibaba Cloud.
Runs of Ma7ee7 Qwen3.8_4B_Distilled on huggingface.co
876
Total runs
0
24-hour runs
-62
3-day runs
-182
7-day runs
-182
30-day runs
More Information About Qwen3.8_4B_Distilled huggingface.co Model
Qwen3.8_4B_Distilled huggingface.co is an AI model on huggingface.co that provides Qwen3.8_4B_Distilled's model effect (), which can be used instantly with this Ma7ee7 Qwen3.8_4B_Distilled model. huggingface.co supports a free trial of the Qwen3.8_4B_Distilled model, and also provides paid use of the Qwen3.8_4B_Distilled. Support call Qwen3.8_4B_Distilled model through api, including Node.js, Python, http.
Qwen3.8_4B_Distilled huggingface.co is an online trial and call api platform, which integrates Qwen3.8_4B_Distilled's modeling effects, including api services, and provides a free online trial of Qwen3.8_4B_Distilled, you can try Qwen3.8_4B_Distilled online for free by clicking the link below.
Ma7ee7 Qwen3.8_4B_Distilled online free url in huggingface.co:
Qwen3.8_4B_Distilled is an open source model from GitHub that offers a free installation service, and any user can find Qwen3.8_4B_Distilled on GitHub to install. At the same time, huggingface.co provides the effect of Qwen3.8_4B_Distilled install, users can directly use Qwen3.8_4B_Distilled installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Qwen3.8_4B_Distilled install url in huggingface.co: