Text Generation
Transformers
Safetensors
qwen3
code
reasoning
lora-merged
livecodebench
conversational
text-generation-inference
Instructions to use modrill/code-think-q4b-20260908 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use modrill/code-think-q4b-20260908 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="modrill/code-think-q4b-20260908") 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("modrill/code-think-q4b-20260908") model = AutoModelForCausalLM.from_pretrained("modrill/code-think-q4b-20260908", 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 modrill/code-think-q4b-20260908 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "modrill/code-think-q4b-20260908" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "modrill/code-think-q4b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/modrill/code-think-q4b-20260908
- SGLang
How to use modrill/code-think-q4b-20260908 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/code-think-q4b-20260908" \ --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": "modrill/code-think-q4b-20260908", "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 "modrill/code-think-q4b-20260908" \ --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": "modrill/code-think-q4b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use modrill/code-think-q4b-20260908 with Docker Model Runner:
docker model run hf.co/modrill/code-think-q4b-20260908
Download adapter/MANIFEST.json from modrill/code-think-q4b-20260908: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/modrill/code-think-q4b-20260908/resolve/main/adapter/MANIFEST.json
- Command line
-
hf download hf://modrill/code-think-q4b-20260908/adapter/MANIFEST.json
-
curl -L -o MANIFEST.json https://huggingface.co/modrill/code-think-q4b-20260908/resolve/main/adapter/MANIFEST.json
1.9 kB
| {"consumed_assistant_target_tokens":64848450,"files":[{"bytes":286,"path":"TOKEN_ROWS_META.json","sha256":"16a5f02dafeca4c7804f7306e353375ac567d8158ed37baa20b80dcfe9188f33"},{"bytes":5246,"path":"adapter/README.md","sha256":"313e09c61dcfa14475fdc5b059122b3654949c8a364e3839cbd3ac8ec0014045"},{"bytes":1314,"path":"adapter/adapter_config.json","sha256":"4e04ab4bb3a660f837b6f57d3964cebfdf5b5a58cebc0c5cd9a30372a396212c"},{"bytes":528611960,"path":"adapter/adapter_model.safetensors","sha256":"619dcee8c5c04416fed0cee928375583332ce2986bf3f51c0caf8408433831ed"},{"bytes":1057223600,"path":"optimizer_state.safetensors","sha256":"b11b3493fdc5e76c68b8e6a90aa8b79156588ebc4fa4aa9b771560f4547a81ef"},{"bytes":88052,"path":"resume_state.json","sha256":"86f4197b5990007e5843922248ec4d63273ab8ab8d0a11b729cc26f2f3e80738"},{"bytes":92560,"path":"token_rows_both_sides.safetensors","sha256":"407274bf3280d79ed8efabaf3c3b3e75debaeb6b8efdb4433ac0bae934144688"}],"job_sha256":"9753e62716354993b5a071b69dfdeb1c3c4950f1a2fe12926afe7d26238cedd3","launch_sha256":"cbb71f81a67235ba1b7433eaf04161da1d19a5860ed9fc0b9e4211e3c7f00f0a","manifest_sha256":"8b5cd8849778a06f8142af223231e47284af7c812c7eedbccb501fb07a404023","materialized_manifest_sha256":"fc22e609554e898f2ae570f75bce208ae3428aada9931dc43bc7da3735f95885","model_revision":"906bfd4b4dc7f14ee4320094d8b41684abff8539","payload_sha256":"6097d7bf8bc18621ed4fbc2c7f4e6a68b65186eb1d25964fd632580f97dabdfd","renderer_authority_sha256":"6b1461404d033b79f05a8cbb373f05a495d506a567b35b18cbf89930f345422a","row_index":8310,"safe_resume":{"adapter":"safetensors","optimizer":"safetensors+json","pickle_used":false,"rng":"json+base64"},"schema":"CODE_SFT_RSTAR_ARM_CHECKPOINT_V1","source_revision":"3a7a0a0636ec96e3c1ec42ebe79ade467caa040d","status":"LOCAL_COMPLETE","step":920,"training_policy_sha256":"c9f6e3b33a4693354da05fd6f18b3d05932430ca7c8dc9f7f008d3dcc49ac592"} | |