MiniCPM5-1B-Claude-Opus-Fable5-Thinking is a compact 1B
Thinking language model built on
openbmb/MiniCPM5-1B. It is further fine-tuned on
Fable 5 data to improve
coding and
instruction-following while keeping MiniCPM5's native Thinking chat template and tool-call format.
For llama.cpp / Ollama / LM Studio deployment, see the
GGUF repository.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-Thinking"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 trust_remote_code=True,
10 torch_dtype=torch.bfloat16,
11 device_map="auto",
12)
13
14messages = [{"role": "user", "content": "Write a Python function to merge two sorted lists."}]
15text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
16inputs = tokenizer(text, return_tensors="pt").to(model.device)
17outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
18print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Generation defaults are inherited from
MiniCPM5-1B: