Instructions to use Rumiii/Qwimi-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rumiii/Qwimi-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rumiii/Qwimi-4B") 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("Rumiii/Qwimi-4B") model = AutoModelForCausalLM.from_pretrained("Rumiii/Qwimi-4B", 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 Rumiii/Qwimi-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rumiii/Qwimi-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwimi-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Rumiii/Qwimi-4B
- SGLang
How to use Rumiii/Qwimi-4B 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 "Rumiii/Qwimi-4B" \ --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": "Rumiii/Qwimi-4B", "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 "Rumiii/Qwimi-4B" \ --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": "Rumiii/Qwimi-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Rumiii/Qwimi-4B with Docker Model Runner:
docker model run hf.co/Rumiii/Qwimi-4B
Qwen3-4B-Instruct-2507 Distilled from Kimi K2
This is a repository which hosts the model files of the Model Distillation performed from the parent model Kimi K2 to the student model Qwen3-4B-Instruct-2507, with the aim of further advancing the student's agentic capabilities, particularly multi-step tool calling.
Model Overview
| Parent (teacher) model | Kimi K2 |
| Student model | Qwen3-4B-Instruct-2507 |
| Dataset | Agent-Ark/Toucan-1.5M (Kimi-K2 configuration) |
| Method | Supervised fine-tuning on teacher trajectories |
Training Data
Toucan-1.5M contains over 1.5 million agentic trajectories synthesized from 495 real-world Model Context Protocol (MCP) servers, spanning more than 2,000 tools. It includes single-turn and multi-turn interactions, as well as sequential and parallel tool calls with real tool execution.
Training used the Kimi-K2 configuration of the dataset. A total of 9,168 samples were used for a single epoch, taken from all four subsets in the following distribution:
| Subset | Samples | Share |
|---|---|---|
| single-turn-original | 2,750 | 30% |
| single-turn-diversify | 2,292 | 25% |
| irrelevant | 1,375 | 15% |
| multi-turn | 2,751 | 30% |
How to use it
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "Rumiii/Qwimi-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="cuda"
)
messages = [
{"role": "user", "content": "What is the capital of France?"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=200,
do_sample=False
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Only a portion of the full dataset was used. Samples longer than 4,096 tokens were excluded (no sample was truncated), as were multi-turn samples that contain tool calls but no declared tools. The trajectories follow the standard Qwen3 tool-calling chat template.
Note
This distillation was performed through an existing dataset. The Kimi K2 responses were not generated live for this model; the trajectories come from Agent-Ark/Toucan-1.5M, which was already available on Hugging Face.
- Downloads last month
- 191
