Instructions to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "modrill/Qwen3-4B-Base-ThinkCode-A-U025") - Transformers
How to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="modrill/Qwen3-4B-Base-ThinkCode-A-U025")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("modrill/Qwen3-4B-Base-ThinkCode-A-U025", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "modrill/Qwen3-4B-Base-ThinkCode-A-U025" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "modrill/Qwen3-4B-Base-ThinkCode-A-U025", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/modrill/Qwen3-4B-Base-ThinkCode-A-U025
- SGLang
How to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 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 "modrill/Qwen3-4B-Base-ThinkCode-A-U025" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "modrill/Qwen3-4B-Base-ThinkCode-A-U025", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "modrill/Qwen3-4B-Base-ThinkCode-A-U025" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "modrill/Qwen3-4B-Base-ThinkCode-A-U025", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use modrill/Qwen3-4B-Base-ThinkCode-A-U025 with Docker Model Runner:
docker model run hf.co/modrill/Qwen3-4B-Base-ThinkCode-A-U025
| {"adapter_model":{"bytes":607652912,"path":"adapter_model.safetensors","sha256":"e23f1eb30f6b2f3677dde70f250aea6fe11268f67f135e42425e3355c7f56822"},"arm_id":"A-U025","base_model":"Qwen/Qwen3-4B-Base","base_revision":"906bfd4b4dc7f14ee4320094d8b41684abff8539","contains_base_layer_tensor":false,"contains_base_model_shards":false,"contains_tokenizer_files":false,"created_at_utc":"2026-08-22T18:05:58Z","format":"PEFT_LORA_ADAPTER_ONLY","payload_files":[{"bytes":1519,"path":".gitattributes","sha256":"11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361"},{"bytes":11343,"path":"LICENSE","sha256":"832dd9e00a68dd83b3c3fb9f5588dad7dcf337a0db50f7d9483f310cd292e92e"},{"bytes":82204,"path":"MODULE_SCALE_MANIFEST.json","sha256":"8c317803003c550eb69d04bd0cb31c191d8d05dd8c8e8fcaedf19d8bf1573391"},{"bytes":4670,"path":"README.md","sha256":"56b9ef75e78ad1bd356d5a11e463ae419523d55739737a5618d4a2536e20e922"},{"bytes":1815,"path":"VALIDATION.json","sha256":"077cc8ee8883353791db34445b2489c5629ac2779d447e91f60891540614d97d"},{"bytes":1209,"path":"adapter_config.json","sha256":"7845c0b42c88faa7cdd3dec89e223b782ab98ac7786e5f789e60ea596bff8555"},{"bytes":607652912,"path":"adapter_model.safetensors","sha256":"e23f1eb30f6b2f3677dde70f250aea6fe11268f67f135e42425e3355c7f56822"}],"payload_manifest_sha256":"f3bf93e8df98b4b70402f7c3bc3ab7d633074ed9bdf5985dfba6dff515a8c426","repo_id":"modrill/Qwen3-4B-Base-ThinkCode-A-U025","scale_contract":{"body":0.25,"lm_head_and_tied_embedding":0.25},"schema":"HF_PEFT_ADAPTER_RELEASE_MANIFEST_V1","source_artifact_receipt_sha256":"2d85f3af2c7461a42889eb6bf5c61161391d464fae7aaa90f7d8aab40a90f6c8","source_original_adapter_sha256":"2eea0b87617f8b1abdfdb476b1521c70df30402fec638777a694b9d03858ee36","source_phase_a_adapter_recursive_sha256":"2a7be2a09738df9e78ec4b9c99bfcb18dff2c580c680976c6dd913bba764f0eb","status":"READY"} | |