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
Download OFFICIAL_MERGE_RECEIPT.json from Montalte/qwen4b-code-think-taskvector: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/Montalte/qwen4b-code-think-taskvector/resolve/main/OFFICIAL_MERGE_RECEIPT.json
- Command line
-
hf download hf://Montalte/qwen4b-code-think-taskvector/OFFICIAL_MERGE_RECEIPT.json
-
curl -L -o OFFICIAL_MERGE_RECEIPT.json https://huggingface.co/Montalte/qwen4b-code-think-taskvector/resolve/main/OFFICIAL_MERGE_RECEIPT.json
1.44 kB
| {"adapter_tree_sha256":"467d7c210b6001b8a1c638cce88ebb5112fa2f7d1684000f712b4ccafa814b29","base_model_path":"/workspace/code-sft-infra/models/qwen3-4b-base","checkpoint_manifest_sha256":"490367bf1e2bd55f5a7381dc4083bcffc18430bcbc26457680c5c17268225bcc","checkpoint_path":"/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/out/Q4B-THINK-MIX/906bfd4b4dc7f14ee4320094d8b41684abff8539/qwen3-8b-think-lcb-system-v2/fc22e609554e898f2ae570f75bce208ae3428aada9931dc43bc7da3735f95885/step-000920-tokens-64848450","label":"v4-q4b-think-mix","merge_backend":"merge_for_eval","merged_at_unix":1788962266.3138773,"merged_model_path":"/workspace/code-sft-runs/rstar-eval/official-dev256/v4-q4b-think-mix/scratch/step-000920-tokens-64848450-merged-full","merged_tree_sha256":"4d14b1af017f7e5f113017a3a2e1a29942463afde5eca0d4f4f9faa0c17194ae","receipt_sha256":"defb397b004f96a114242399a45d919ecdc2c88fc3fde9e409e425bac453af12","schema":"CODE_SFT_OFFICIAL_DEV256_MERGE_RECEIPT_V1","token_rows_meta_path":"/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/Q4B-THINK-MIX/out/Q4B-THINK-MIX/906bfd4b4dc7f14ee4320094d8b41684abff8539/qwen3-8b-think-lcb-system-v2/fc22e609554e898f2ae570f75bce208ae3428aada9931dc43bc7da3735f95885/step-000920-tokens-64848450/TOKEN_ROWS_META.json","token_rows_meta_worker":"rstar_dual_worker_v4","untied_export":{"lm_head_weight_shard":"model.safetensors","tie_word_embeddings":false}} | |