Text Generation
Transformers
Safetensors
qwen3
Merge
taskvector
code
think
conversational
text-generation-inference
Instructions to use Montalte/qwen4b-code-think-taskvector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Montalte/qwen4b-code-think-taskvector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Montalte/qwen4b-code-think-taskvector") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Montalte/qwen4b-code-think-taskvector") model = AutoModelForCausalLM.from_pretrained("Montalte/qwen4b-code-think-taskvector", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Montalte/qwen4b-code-think-taskvector with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Montalte/qwen4b-code-think-taskvector" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Montalte/qwen4b-code-think-taskvector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Montalte/qwen4b-code-think-taskvector
- SGLang
How to use Montalte/qwen4b-code-think-taskvector with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Montalte/qwen4b-code-think-taskvector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Montalte/qwen4b-code-think-taskvector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Montalte/qwen4b-code-think-taskvector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Montalte/qwen4b-code-think-taskvector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Montalte/qwen4b-code-think-taskvector with Docker Model Runner:
docker model run hf.co/Montalte/qwen4b-code-think-taskvector
File size: 4,733 Bytes
f82d492 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | {
"schema": "RUN_IDENTITY_V1",
"run_id": "t30b2507-q4b-think-mix-l0.2-s0.8-v4-tail151643",
"corrects": "Q4B-THINK Mix Distillation 0.2:0.8 (30B-A3B-Thinking : 4B-Thinking by rows)",
"notes": "Mix Distillation Mix-Large (Li et al. 2025 arXiv 2502.12143): 30B-A3B-Thinking : 4B-Thinking = 0.2 : 0.8 by row/problem; one teacher trace per problem; dose target 32436894/ep ±1%, actual 1ep 32424225, 2ep 64848450. 30B source=/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP.parquet sha=c160713fea76eae124dbbc3b5c619d3164862da83f61d91d3970ede990a12540 (2EP first half 4715 rows). 4B source=/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-T4BDATA/data/joint-full-t4b_tail151643.parquet sha=d09c4d6272de7e50c9b2df0e401878864f09bda33db05a5833c43575969fa524. V4 recipe unchanged (LoRA r64/α128, lr 1e-4, both-sides B-row [151643,151667,151668], physical 2ep concat, seed 42). PI approved 2026-09-09.",
"model": {
"hf_id": "Qwen/Qwen3-4B-Base",
"revision": "906bfd4b4dc7f14ee4320094d8b41684abff8539",
"local_path": "/workspace/code-sft-infra/models/qwen3-4b-base",
"tied_embeddings": true
},
"data": {
"path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/data/mix_l0.2_s0.8_tail151643_2EP.parquet",
"rows": 8310,
"sha256": "6097d7bf8bc18621ed4fbc2c7f4e6a68b65186eb1d25964fd632580f97dabdfd",
"census": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/data/TOKEN_CENSUS_MIX.json",
"physical_2ep": "concat(mix, mix) same order; teacher_source 30b/4b; tail 151643",
"source_1ep_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/data/mix_l0.2_s0.8_tail151643.parquet",
"source_1ep_sha256": "3c5ae286e7e5242df3c011123edaf0727405d3b535e85d77ce6b99afe7c27e77",
"source_1ep_rows": 4155,
"teacher_30b_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP.parquet",
"teacher_30b_sha256": "c160713fea76eae124dbbc3b5c619d3164862da83f61d91d3970ede990a12540",
"teacher_4b_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-T4BDATA/data/joint-full-t4b_tail151643.parquet",
"teacher_4b_sha256": "d09c4d6272de7e50c9b2df0e401878864f09bda33db05a5833c43575969fa524",
"mix_ratio_rows": "0.2:0.8",
"n30": 831,
"n4": 3324,
"active_tokens_1ep": 32424225
},
"seeds": {
"train": 42,
"eval": 3407,
"mix": 42
},
"parameters": {
"epochs": 2,
"target_assistant_tokens": 64848450,
"active_tokens_1ep": 32424225,
"checkpoint_target_tokens": [
32445505,
48759220,
64848450
],
"milestone_updates": [
495,
744,
990
],
"warmup_target_tokens": 3890907,
"learning_rate": 0.0001,
"row_lr": 0.0001,
"optimizer": "adamw",
"optimizer_betas": [
0.9,
0.95
],
"optimizer_eps": 1e-08,
"lora_rank": 64,
"lora_alpha": 128,
"lora_dropout": 0.0,
"lora_target_modules": [
"q_proj",
"k_proj",
"v_proj",
"o_proj",
"gate_proj",
"up_proj",
"down_proj"
],
"lora_weight_decay": 0.1,
"row_weight_decay": 0.0,
"max_grad_norm": 1.0,
"tokens_per_optimizer_update": 65536,
"packing": false,
"truncation": false,
"repeat_examples": false,
"precision": "bfloat16",
"trainable_dtype": "float32",
"gradient_checkpointing": true,
"eos_weight": 1.0,
"scheduler": "cosine_by_assistant_target_token_dose",
"worker_lr_scale": "rstar_dual_worker_v4._lr_scale",
"supervised_tail": [
151643
],
"trainable_token_indices": {
"embed_tokens": [
151643,
151667,
151668
],
"lm_head": [
151643,
151667,
151668
]
},
"untie_tied_embeddings": true,
"context": 32768,
"eval": {
"suite": "DEV256",
"seed": 3407,
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"ctx": 32768,
"stop_ids": [
151643,
151645
],
"base_reeval_same_mode": true
}
},
"code": {
"path": "/workspace/tools/rstar_dual_worker_v4.py",
"commit_or_sha256": "5cbdaca65556cbe0cf9e1374cf122c22511b02781eda6fab4ca780a869562cb7",
"prep": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/scripts/build_mix_distill_payload.py",
"prep_sha256": "2ff0f61e200d18dd55b1301f9573e923abd6fe87608220f7126cf709d4cb7288"
},
"started_at": "2026-09-09T06:13:03Z",
"endpoint": "2EP_ONLY @64848450 assistant tokens; no checkpoint picking",
"status": "RUNNING"
}
|