Text Generation
MLX
Safetensors
qwen3
lora
code
reasoning
tennda
distillation
conversational
4-bit precision
Instructions to use MLA299/Tennda-Reason with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MLA299/Tennda-Reason with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("MLA299/Tennda-Reason") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use MLA299/Tennda-Reason with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MLA299/Tennda-Reason"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MLA299/Tennda-Reason" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use MLA299/Tennda-Reason with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "MLA299/Tennda-Reason"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "MLA299/Tennda-Reason" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MLA299/Tennda-Reason", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use MLA299/Tennda-Reason with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MLA299/Tennda-Reason"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MLA299/Tennda-Reason
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MLA299/Tennda-Reason with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MLA299/Tennda-Reason"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MLA299/Tennda-Reason" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -2,11 +2,9 @@
|
|
| 2 |
library_name: mlx
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
license: apache-2.0
|
| 5 |
-
base_model: Qwen/Qwen3-8B
|
| 6 |
tags:
|
| 7 |
- mlx
|
| 8 |
- lora
|
| 9 |
-
- qwen3
|
| 10 |
- code
|
| 11 |
- reasoning
|
| 12 |
- text-generation
|
|
@@ -14,10 +12,10 @@ tags:
|
|
| 14 |
- distillation
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# Tennda-
|
| 18 |
|
| 19 |
-
> **Tennda
|
| 20 |
-
>
|
| 21 |
|
| 22 |
---
|
| 23 |
|
|
@@ -25,24 +23,25 @@ tags:
|
|
| 25 |
|
| 26 |
| Item | Details |
|
| 27 |
|---|---|
|
| 28 |
-
| **Model Name** | Tennda-
|
| 29 |
| **Developer** | Tennda Team |
|
| 30 |
-
| **
|
| 31 |
-
| **
|
| 32 |
-
| **Weight Format** | 4-bit
|
| 33 |
-
| **Framework** | MLX 0.32.1 + mlx-lm 0.31.3
|
| 34 |
-
| **Training
|
| 35 |
-
| **
|
|
|
|
| 36 |
| **Release Date** | 2026-08-24 |
|
| 37 |
|
| 38 |
---
|
| 39 |
|
| 40 |
## Highlights
|
| 41 |
|
| 42 |
-
- **
|
| 43 |
-
- **
|
| 44 |
-
- **
|
| 45 |
-
- **Apple Silicon
|
| 46 |
|
| 47 |
---
|
| 48 |
|
|
@@ -55,45 +54,43 @@ tags:
|
|
| 55 |
| Train loss | 1.70 | — | **0.421** |
|
| 56 |
| Val loss | 1.702 | **0.590** (iter 700) | 0.794 |
|
| 57 |
|
| 58 |
-

|
| 89 |
|
| 90 |
-
### With mlx-lm
|
| 91 |
-
|
| 92 |
```python
|
| 93 |
from mlx_lm import load, generate
|
| 94 |
|
| 95 |
model, tokenizer = load("MLA299/Tennda-Reason")
|
| 96 |
-
messages = [{"role": "user", "content": "
|
| 97 |
prompt = tokenizer.apply_chat_template(
|
| 98 |
messages, tokenize=False, add_generation_prompt=True
|
| 99 |
)
|
|
@@ -101,37 +98,30 @@ response = generate(model, tokenizer, prompt=prompt, max_tokens=2048, verbose=Fa
|
|
| 101 |
print(response)
|
| 102 |
```
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
```bash
|
| 107 |
-
mlx_lm.generate --model MLA299/Tennda-Reason
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
### LoRA adapter only (轻量分发)
|
| 111 |
-
|
| 112 |
-
```python
|
| 113 |
-
model, tokenizer = load("mlx-community/Qwen3-8B-4bit", adapter_path="MLA299/Tennda-Reason-LoRA")
|
| 114 |
```
|
| 115 |
|
| 116 |
-
>
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
## Limitations
|
| 121 |
|
| 122 |
-
-
|
| 123 |
-
- SFT
|
| 124 |
-
-
|
| 125 |
-
-
|
| 126 |
|
| 127 |
---
|
| 128 |
|
| 129 |
-
##
|
| 130 |
|
| 131 |
-
|
| 132 |
-
- Data: [r0b0tlab/qwen3.8-max-glm5.2-kimi-k3-distillation](https://huggingface.co/datasets/r0b0tlab/qwen3.8-max-glm5.2-kimi-k3-distillation) (sft_balanced subset)
|
| 133 |
-
- Training framework: [mlx-lm](https://github.com/ml-explore/mlx-lm) LoRA
|
| 134 |
-
- Full report: TRAINING_REPORT_QWEN.md (internal)
|
| 135 |
|
| 136 |
---
|
| 137 |
|
|
@@ -139,7 +129,7 @@ model, tokenizer = load("mlx-community/Qwen3-8B-4bit", adapter_path="MLA299/Tenn
|
|
| 139 |
|
| 140 |
```bibtex
|
| 141 |
@misc{tennda-reason-2026,
|
| 142 |
-
title = {Tennda-Reason: A Distillation-Fine-tuned
|
| 143 |
author = {Tennda Team},
|
| 144 |
year = {2026},
|
| 145 |
month = {August},
|
|
@@ -150,4 +140,4 @@ model, tokenizer = load("mlx-community/Qwen3-8B-4bit", adapter_path="MLA299/Tenn
|
|
| 150 |
|
| 151 |
---
|
| 152 |
|
| 153 |
-
*Tennda-
|
|
|
|
| 2 |
library_name: mlx
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
license: apache-2.0
|
|
|
|
| 5 |
tags:
|
| 6 |
- mlx
|
| 7 |
- lora
|
|
|
|
| 8 |
- code
|
| 9 |
- reasoning
|
| 10 |
- text-generation
|
|
|
|
| 12 |
- distillation
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Tennda-Reason
|
| 16 |
|
| 17 |
+
> **A high-efficiency code & reasoning assistant fine-tuned by the Tennda Team**
|
| 18 |
+
> Structured `<think>` reasoning followed by complete, production-ready answers — refined thinking, reliable delivery, built for code generation, math, and logical reasoning on Apple Silicon.
|
| 19 |
|
| 20 |
---
|
| 21 |
|
|
|
|
| 23 |
|
| 24 |
| Item | Details |
|
| 25 |
|---|---|
|
| 26 |
+
| **Model Name** | Tennda-Reason |
|
| 27 |
| **Developer** | Tennda Team |
|
| 28 |
+
| **Parameters** | 8.2B (4-bit quantized, ~4.3GB) |
|
| 29 |
+
| **Architecture** | Standard Transformer decoder, native `<think>` reasoning support |
|
| 30 |
+
| **Weight Format** | 4-bit, MLX native |
|
| 31 |
+
| **Framework** | MLX 0.32.1 + mlx-lm 0.31.3 (Apple Silicon Metal acceleration) |
|
| 32 |
+
| **Training** | QLoRA (rank=16, scale=32, last 16 layers, 19.4M trainable params / 0.237%) |
|
| 33 |
+
| **Training Data** | Multi-teacher distillation SFT corpus (2,000 curated samples): math 27% · code 27% · reasoning 20% · instruction 14% |
|
| 34 |
+
| **Context Length** | 1024 (trained), extensible via base capabilities |
|
| 35 |
| **Release Date** | 2026-08-24 |
|
| 36 |
|
| 37 |
---
|
| 38 |
|
| 39 |
## Highlights
|
| 40 |
|
| 41 |
+
- **Refined thinking**: `<think>` reasoning chains compressed to 300–550 token key-point style — no rambling, no wasted tokens
|
| 42 |
+
- **Complete delivery**: trained on "short thinking + complete answer" patterns; 0/5 test failures from runaway reasoning (baseline: 2/5)
|
| 43 |
+
- **Multi-domain**: balanced across math, code, logical reasoning, and instruction following
|
| 44 |
+
- **Apple Silicon native**: MLX 4-bit, ~6GB peak inference memory, runs on a single M-series machine
|
| 45 |
|
| 46 |
---
|
| 47 |
|
|
|
|
| 54 |
| Train loss | 1.70 | — | **0.421** |
|
| 55 |
| Val loss | 1.702 | **0.590** (iter 700) | 0.794 |
|
| 56 |
|
| 57 |
+

|
| 58 |
|
| 59 |
+
- 2,000 iterations ≈ 2 epochs (batch=2, seq=1024, ~67 tokens/s, ~8h on a single M4)
|
| 60 |
+
- GPU peak memory **8.5GB**, stable throughout, zero OOM
|
| 61 |
+
- **Released checkpoint: iter 700** (best validation loss), selected via blind A/B output comparison against the final checkpoint
|
| 62 |
|
| 63 |
### Checkpoint Selection
|
| 64 |
|
| 65 |
+
| | iter 700 (released) | iter 2000 |
|
| 66 |
|---|---|---|
|
| 67 |
| Val loss | **0.590** | 0.794 |
|
| 68 |
+
| Factual accuracy (networking task) | ✅ correct | ❌ detail error |
|
| 69 |
+
| Format compliance | ✅ verified | ✅ |
|
| 70 |
|
| 71 |
---
|
| 72 |
|
| 73 |
+
## Evaluation (5 prompts, temp=0.3, vs pre-training baseline)
|
| 74 |
|
| 75 |
+
| Task | Tennda-Reason | Baseline |
|
| 76 |
|---|---|---|
|
| 77 |
+
| Python quicksort | ✅ complete runnable code + complexity analysis | ❌ reasoning runaway, no answer produced |
|
| 78 |
+
| JS closures | ✅ full structured tutorial | ⚠️ thin output |
|
| 79 |
+
| SQL top salary per dept | ✅ window-function solutions | ❌ reasoning runaway, no answer produced |
|
| 80 |
+
| TCP 3-way handshake | ✅ vivid analogy, correct steps | ✅ concise & correct |
|
| 81 |
+
| Python HTTP server | ⚠️ multi-approach, minor rough edges | ✅ concise & correct |
|
| 82 |
|
| 83 |
+
**Summary**: format compliance 5/5; runaway-reasoning failures reduced from 2/5 (baseline) to 0/5; overall usability substantially improved.
|
| 84 |
|
| 85 |
---
|
| 86 |
|
| 87 |
## Usage (MLX)
|
| 88 |
|
|
|
|
|
|
|
| 89 |
```python
|
| 90 |
from mlx_lm import load, generate
|
| 91 |
|
| 92 |
model, tokenizer = load("MLA299/Tennda-Reason")
|
| 93 |
+
messages = [{"role": "user", "content": "Write a quicksort in Python"}]
|
| 94 |
prompt = tokenizer.apply_chat_template(
|
| 95 |
messages, tokenize=False, add_generation_prompt=True
|
| 96 |
)
|
|
|
|
| 98 |
print(response)
|
| 99 |
```
|
| 100 |
|
| 101 |
+
Command line:
|
| 102 |
|
| 103 |
```bash
|
| 104 |
+
mlx_lm.generate --model MLA299/Tennda-Reason \
|
| 105 |
+
--prompt "Write a SQL query: highest salary per department" \
|
| 106 |
+
--max-tokens 2048
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
```
|
| 108 |
|
| 109 |
+
> Recommended sampling: temp=0.3–0.7, max_tokens ≥ 2048 (thinking chain + full answer)
|
| 110 |
|
| 111 |
---
|
| 112 |
|
| 113 |
## Limitations
|
| 114 |
|
| 115 |
+
- Training data is English-dominant; Chinese works but is not specifically optimized
|
| 116 |
+
- Post-SFT the model is more confident; factual-detail hallucinations are slightly higher than baseline — verify critical details in production
|
| 117 |
+
- Trained at 1024 context; longer inputs rely on native capabilities
|
| 118 |
+
- Contains synthetic distillation content; upstream data terms apply
|
| 119 |
|
| 120 |
---
|
| 121 |
|
| 122 |
+
## License
|
| 123 |
|
| 124 |
+
Apache-2.0. See the license terms for redistribution conditions.
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
---
|
| 127 |
|
|
|
|
| 129 |
|
| 130 |
```bibtex
|
| 131 |
@misc{tennda-reason-2026,
|
| 132 |
+
title = {Tennda-Reason: A Distillation-Fine-tuned Model for Code and Reasoning on Apple Silicon},
|
| 133 |
author = {Tennda Team},
|
| 134 |
year = {2026},
|
| 135 |
month = {August},
|
|
|
|
| 140 |
|
| 141 |
---
|
| 142 |
|
| 143 |
+
*Tennda-Reason · © 2026 Tennda Team*
|