Chimera-14B — DeepSeek-R1-Distill-Qwen-14B Agent LoRA
A dual-capability LoRA adapter for
huihui-ai/DeepSeek-R1-Distill-Qwen-14B-abliterated-v2 that adds
tool calling and
extended reasoning to the same weights. The model reasons inside
<think> blocks and emits tool-call JSON in the same response.
Two heads, one beast: one for thought, one for action.
- Base model: huihui-ai/DeepSeek-R1-Distill-Qwen-14B-abliterated-v2
- Adapter type: LoRA (PEFT), r=16, alpha=16, dropout=0, bias=none
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Trainable params: 68,812,800 (0.46% of 14.8B)
- Chat template: qwen-2.5
- License: MIT (inherited from the DeepSeek-R1-Distill-Qwen-14B lineage)
Why this model exists
DeepSeek-R1-Distill-Qwen-14B is already remarkable at one thing: packing genuinely impressive reasoning into a small parameter count. The distillation process compressed R1's deliberative thinking down to a 14B footprint, and the result thinks in ways that feel far larger than its size.
Chimera-14B takes that and makes it useful.
A model that only reasons is a model that thinks beautifully and then stops. The missing piece is the ability to act on those thoughts — to call tools, fetch data, and close the loop between deliberation and execution. So this adapter stacks two capabilities on top of the distilled reasoning base:
- Tool calling — the model learns to emit structured tool-call JSON, turning its reasoning into concrete actions.
- Extended reasoning — further SFT on top deepens and lengthens the
<think> chains it can sustain.
The result is a 14B model that reasons like a much larger one and acts on what it reasons about — a genuinely impressive amount of reasoning for a model this small, with the tool-calling to make it do something.
What it does
Trained in two sequential stages on the same LoRA weights:
- Stage 1 — tool calling on
DJLougen/hermes-agent-traces-filtered: teaches the model to emit structured tool-call JSON.
- Stage 2 — reasoning on
open-r1/Mixture-of-Thoughts (config all, 2,425 train / 50 eval examples, filtered to <1,900 tokens): teaches the model to reason inside <think> blocks.
Verified at inference: the model produces a <think> reasoning block and a tool-call JSON payload in the same response — no separate passes, no scaffolding.
Quickstart — PEFT (transformers)
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base_id = "huihui-ai/DeepSeek-R1-Distill-Qwen-14B-abliterated-v2"
6adapter_id = "Flexingmeow/Chimera-14B"
7
8tokenizer = AutoTokenizer.from_pretrained(adapter_id)
9model = AutoModelForCausalLM.from_pretrained(
10 base_id,
11 torch_dtype=torch.float16,
12 device_map="auto",
13)
14model = PeftModel.from_pretrained(model, adapter_id)
15model.eval()
16
17tools = [
18 {
19 "type": "function",
20 "function": {
21 "name": "get_weather",
22 "description": "Get the current weather for a city",
23 "parameters": {
24 "type": "object",
25 "properties": {"city": {"type": "string"}},
26 "required": ["city"],
27 },
28 },
29 }
30]
31
32messages = [
33 {
34 "role": "user",
35 "content": "What's the weather in Osaka right now? Use the weather tool.",
36 }
37]
38text = tokenizer.apply_chat_template(
39 messages, tools=tools, tokenize=False, add_generation_prompt=True
40)
41inputs = tokenizer(text, return_tensors="pt").to(model.device)
42
43with torch.no_grad():
44 out = model.generate(
45 **inputs,
46 max_new_tokens=1024,
47 temperature=0.7,
48 do_sample=True,
49 )
50
51print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Important: pass tools=... to apply_chat_template. The model is trained to call the tools it is shown; without tool definitions in the prompt it will answer conversationally (or refuse-style) instead of emitting a tool call.
Expected output shape
Verified at inference, the model emits a <think> reasoning block followed by a markdown-fenced JSON block — not <tool_call> tags:
1<think>
2The user is asking about weather in Osaka, so I should call the weather tool with the city parameter set to "Osaka".
3</think>
4
5```json
6{"name": "get_weather", "arguments": {"city": "Osaka"}}
7```
The JSON content is a valid tool call, but the wrapper is a markdown code fence. Write your parser to extract the JSON from inside the ```json block rather than matching <tool_call> tags — the model does not emit those.
Quickstart — llama.cpp (GGUF LoRA)
This repo bundles everything you need — the base model GGUF (DeepSeek-R1-Distill-Qwen-14B-abliterated-v2.Q4_K_M.gguf) plus the adapter (agent-lora-f16.gguf, 137.6 MB, f16, llama.cpp LoRA format). Apply the adapter on top of the base:
1# clone the repo (or download the two .gguf files from the Files tab)
2git lfs install && git clone https://huggingface.co/Flexingmeow/Chimera-14B
3
4llama-cli \
5 -m DeepSeek-R1-Distill-Qwen-14B-abliterated-v2.Q4_K_M.gguf \
6 --lora agent-lora-f16.gguf \
7 --jinja \
8 -ngl 99 \
9 -c 4096 \
10 --temp 0.7 \
11 -p "What's the weather in Osaka right now? Use the weather tool."
--lora agent-lora-f16.gguf applies the adapter (the short flag is -l, but --lora is unambiguous).
--jinja is required — it enables the repo's chat template (qwen-2.5), which is what makes tool calling work.
-ngl 99 offloads all layers to GPU; drop it if you're running CPU-only.
Use --lora-scaled agent-lora-f16.gguf <scale> to tune adapter strength (default scale is 1.0).
Training details
Two sequential SFT stages on the same adapter weights, trained with Unsloth on a single Tesla T4 (Kaggle), ~5.5 hours total for stage 2.
Stage 1 — tool calling
- Dataset: DJLougen/hermes-agent-traces-filtered
- Output: qwen-14b-tool-calling-lora-final
Stage 2 — reasoning
- Dataset: open-r1/Mixture-of-Thoughts (config
all)
- Splits: 2,425 train / 50 eval, filtered to <1,900 tokens per example
- Epochs / steps: 1 epoch, 304 steps
- Output: qwen-14b-agent-lora-final
Hyperparameters
| Parameter | Value |
|---|
| LoRA r | 16 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Bias | none |
| Learning rate | 5e-5 |
| LR schedule | cosine |
| Warmup steps | 20 |
| Batch size | 1 × grad accum 8 (effective 8) |
| Optimizer | adamw_8bit |
| Weight decay | 0.01 |
| Precision | fp16 |
| Max sequence length | 2048 |
| Packing | True |
Evaluation
Eval loss during stage 2:
| Step | Eval loss |
|---|
| 50 | 0.9476 |
| 300 | 0.8695 |
Files
| File | Description |
|---|
adapter_model.safetensors | LoRA weights (PEFT format, 275 MB) |
adapter_config.json | PEFT adapter config |
agent-lora-f16.gguf | LoRA in llama.cpp GGUF format (f16, 137.6 MB) |
DeepSeek-R1-Distill-Qwen-14B-abliterated-v2.Q4_K_M.gguf | Base model GGUF (Q4_K_M, ~9 GB) — included so the LoRA works out of the box with llama.cpp |
chat_template.jinja | Qwen-2.5 chat template |
tokenizer.json, tokenizer_config.json | Matching tokenizer files |
Limitations
- Trained on an abliterated base model; inherit the usual caveats about uncensored weights.
- Tool-calling quality is strongest for JSON-schema-style tools; exotic argument formats may need few-shot prompting.
- Tool-call output is wrapped in a markdown ```json fence, not
<tool_call> tags — parsers must extract from the fence.
- 14B at fp16 needs ~28 GB VRAM for the full base + adapter; use 4-bit quantization of the base for smaller GPUs.
Weights: this repo · Docs & code: github.com/mandoof1/chimera-14b