Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
qwen3.5
reasoning
long-context
1M-context
function-calling
tool-use
sft
full-fine-tune
agentic
conversational
multimodal
vision
Eval Results (legacy)
Instructions to use TaimoorSiddiqui/Hopcoder-Mini-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TaimoorSiddiqui/Hopcoder-Mini-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TaimoorSiddiqui/Hopcoder-Mini-9B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("TaimoorSiddiqui/Hopcoder-Mini-9B") model = AutoModelForMultimodalLM.from_pretrained("TaimoorSiddiqui/Hopcoder-Mini-9B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TaimoorSiddiqui/Hopcoder-Mini-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TaimoorSiddiqui/Hopcoder-Mini-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TaimoorSiddiqui/Hopcoder-Mini-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TaimoorSiddiqui/Hopcoder-Mini-9B
- SGLang
How to use TaimoorSiddiqui/Hopcoder-Mini-9B 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 "TaimoorSiddiqui/Hopcoder-Mini-9B" \ --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": "TaimoorSiddiqui/Hopcoder-Mini-9B", "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 "TaimoorSiddiqui/Hopcoder-Mini-9B" \ --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": "TaimoorSiddiqui/Hopcoder-Mini-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TaimoorSiddiqui/Hopcoder-Mini-9B with Docker Model Runner:
docker model run hf.co/TaimoorSiddiqui/Hopcoder-Mini-9B
| license: apache-2.0 | |
| base_model: empero-ai/Qwythos-9B-Claude-Mythos-5-1M | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - qwen3.5 | |
| - reasoning | |
| - long-context | |
| - 1M-context | |
| - function-calling | |
| - tool-use | |
| - sft | |
| - full-fine-tune | |
| - agentic | |
| - conversational | |
| - multimodal | |
| - vision | |
| model-index: | |
| - name: Hopcoder-Mini-9B | |
| results: | |
| - task: | |
| type: text-generation | |
| label: Text Generation | |
| dataset: | |
| name: Unknown | |
| type: generic | |
| metrics: | |
| - type: custom | |
| value: TBD | |
| # Hopcoder-Mini-9B | |
| **Hopcoder-Mini-9B** is a compact 9B-parameter reasoning model with a **1,048,576-token context window** (YaRN rope-scaling enabled by default), native function calling, and strong chain-of-thought performance. | |
| ## Highlights | |
| - **1M-token context** out of the box via YaRN. | |
| - **Native Qwen3.5-style function calling** — no wrapper needed. | |
| - **Self-corrects with tools** — emits source-cited, factually grounded answers when given a Python executor and web search. | |
| - Built on a Qwen3.5-9B base (via empero-ai/Qwythos-9B-Claude-Mythos-5-1M), full-parameter fine-tuned on high-quality reasoning traces. | |
| ## Architecture | |
| | Field | Value | | |
| |---|---| | |
| | Architecture | Qwen3_5ForConditionalGeneration | | |
| | Model type | qwen3_5 (text + vision) | | |
| | Parameters | ~9B | | |
| | Hidden size | 4096 | | |
| | Layers | 32 (hybrid linear / full attention) | | |
| | Attention heads | 16 | | |
| | KV heads | 4 | | |
| | Vocab size | 248,320 | | |
| | Max context | 1,048,576 tokens | | |
| | Precision | bfloat16 | | |
| ## Requirements | |
| - `transformers >= 5.12.1` (required for `qwen3_5` model type) | |
| - `torch >= 2.1` | |
| - `trust_remote_code=True` when loading | |
| ## Usage | |
| ### Text-only input | |
| ```python | |
| import torch | |
| from transformers import AutoModelForImageTextToText, AutoProcessor | |
| model = AutoModelForImageTextToText.from_pretrained( | |
| "TaimoorSiddiqui/Hopcoder-Mini-9B", | |
| dtype=torch.bfloat16, | |
| device_map="auto", | |
| trust_remote_code=True, | |
| ) | |
| processor = AutoProcessor.from_pretrained( | |
| "TaimoorSiddiqui/Hopcoder-Mini-9B", | |
| trust_remote_code=True, | |
| ) | |
| messages = [ | |
| {"role": "user", "content": "What is 2+2?"}, | |
| ] | |
| text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = processor(text=text, return_tensors="pt").to(model.device) | |
| out = model.generate(**inputs, max_new_tokens=512) | |
| print(processor.decode(out[0], skip_special_tokens=True)) | |
| ``` | |
| ### Vision input | |
| ```python | |
| from transformers import AutoModelForImageTextToText, AutoProcessor | |
| from PIL import Image | |
| model = AutoModelForImageTextToText.from_pretrained( | |
| "TaimoorSiddiqui/Hopcoder-Mini-9B", | |
| dtype=torch.bfloat16, | |
| device_map="auto", | |
| trust_remote_code=True, | |
| ) | |
| processor = AutoProcessor.from_pretrained( | |
| "TaimoorSiddiqui/Hopcoder-Mini-9B", | |
| trust_remote_code=True, | |
| ) | |
| image = Image.open("example.jpg") | |
| messages = [ | |
| {"role": "user", "content": [ | |
| {"type": "image", "image": image}, | |
| {"type": "text", "text": "Describe this image."}, | |
| ]}, | |
| ] | |
| text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = processor(text=text, images=image, return_tensors="pt").to(model.device) | |
| out = model.generate(**inputs, max_new_tokens=512) | |
| print(processor.decode(out[0], skip_special_tokens=True)) | |
| ``` | |
| Sampling: `temperature=0.6, top_p=0.95, top_k=20` (Qwen3.5 defaults). | |
| ## License | |
| Apache 2.0. | |