finetuning-LLM
Collection
finetuned llm โข 19 items โข Updated
How to use wesjos/Mimo-Qwen3.5-9B-Cold with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="wesjos/Mimo-Qwen3.5-9B-Cold")
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) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("wesjos/Mimo-Qwen3.5-9B-Cold")
model = AutoModelForMultimodalLM.from_pretrained("wesjos/Mimo-Qwen3.5-9B-Cold", device_map="auto")
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=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use wesjos/Mimo-Qwen3.5-9B-Cold with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "wesjos/Mimo-Qwen3.5-9B-Cold"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "wesjos/Mimo-Qwen3.5-9B-Cold",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/wesjos/Mimo-Qwen3.5-9B-Cold
How to use wesjos/Mimo-Qwen3.5-9B-Cold with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "wesjos/Mimo-Qwen3.5-9B-Cold" \
--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": "wesjos/Mimo-Qwen3.5-9B-Cold",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "wesjos/Mimo-Qwen3.5-9B-Cold" \
--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": "wesjos/Mimo-Qwen3.5-9B-Cold",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use wesjos/Mimo-Qwen3.5-9B-Cold with Docker Model Runner:
docker model run hf.co/wesjos/Mimo-Qwen3.5-9B-Cold
A cold-style preference-aligned model built on MiMo-V2.6-Distill-Qwen-9B: DPO applied directly to the base model (no SFT), using 1,027 modified LIMA-style preference pairs to make responses concise, decisive, and direct โ while preserving intelligence and general knowledge.
| Attribute | Value |
|---|---|
| Model Name | wesjos/Mimo-Qwen3.5-9B-Cold |
| Base | MiMo-V2.6-Distill-Qwen-9B (Qwen3.5-architecture distill, 9.4B params) |
| Method | DPO (Direct Preference Optimization), skipping SFT |
| Training Data | lima_dpo_clean.jsonl โ 1,027 LIMA-style preference pairs |
| Training Framework | Unsloth + TRL DPOTrainer (QLoRA 4bit) |
| Release Formats | HF merged_16bit (18 GB) ยท LoRA adapter ยท GGUF Q8_0 (8.87 GB) |
| Context Length | 262,144 (native) |
| Languages | English / Chinese |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"<repo>/merged_16bit", torch_dtype="bfloat16", device_map="auto"
)
tok = AutoTokenizer.from_pretrained("<repo>/merged_16bit")
messages = [{"role": "user", "content": "Introduce yourself in two sentences."}]
inputs = tok.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True,
enable_thinking=False, return_tensors="pt", return_dict=True,
).to("cuda")
out = model.generate(**inputs, max_new_tokens=300, temperature=0.6, top_p=0.9)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
llama-server -m mimo-9b-cold-Q8_0.gguf \
--ctx-size 8192 -ngl 99 -ctk q8_0 -ctv q8_0 -fa on \
--jinja --alias mimo-9b-cold --port 18080
enable_thinking toggleBase model
Qwen/Qwen3.5-9B-Base