Text Generation
MLX
Safetensors
English
Chinese
bailing_hybrid
mlx-lm
omlx
mixture-of-experts
linear-attention
quantized
apple-silicon
custom_code
oq2
conversational
2-bit
Instructions to use TensorFold/Ling-3.0-flash-oQ2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use TensorFold/Ling-3.0-flash-oQ2 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("TensorFold/Ling-3.0-flash-oQ2") 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 TensorFold/Ling-3.0-flash-oQ2 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "TensorFold/Ling-3.0-flash-oQ2"
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": "TensorFold/Ling-3.0-flash-oQ2" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use TensorFold/Ling-3.0-flash-oQ2 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "TensorFold/Ling-3.0-flash-oQ2"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "TensorFold/Ling-3.0-flash-oQ2" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TensorFold/Ling-3.0-flash-oQ2", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use TensorFold/Ling-3.0-flash-oQ2 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 "TensorFold/Ling-3.0-flash-oQ2"
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 TensorFold/Ling-3.0-flash-oQ2
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TensorFold/Ling-3.0-flash-oQ2 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "TensorFold/Ling-3.0-flash-oQ2"
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 "TensorFold/Ling-3.0-flash-oQ2" \ --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"
Rebrand model card to TensorFold
Browse files
README.md
CHANGED
|
@@ -20,6 +20,11 @@ tags:
|
|
| 20 |
- oq2
|
| 21 |
---
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
<p align="center">
|
| 25 |
<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*4QxcQrBlTiAAAAAAQXAAAAgAemJ7AQ/original" width="100" alt="Ling logo">
|
|
@@ -29,7 +34,7 @@ tags:
|
|
| 29 |
<p align="center">
|
| 30 |
<img src="https://img.shields.io/badge/InclusionAI-Ling-1677FF?style=for-the-badge" alt="InclusionAI Ling">
|
| 31 |
<img src="https://img.shields.io/badge/Apple_Silicon-MLX-000000?style=for-the-badge&logo=apple&logoColor=white" alt="Apple silicon MLX">
|
| 32 |
-
<img src="https://img.shields.io/badge/
|
| 33 |
</p>
|
| 34 |
|
| 35 |
|
|
@@ -111,8 +116,8 @@ The decode figure is the median of three greedy 256-token runs after a full 256-
|
|
| 111 |
|
| 112 |
|
| 113 |
```bash
|
| 114 |
-
hf download
|
| 115 |
-
--local-dir ~/.omlx/models/
|
| 116 |
```
|
| 117 |
|
| 118 |
|
|
@@ -149,7 +154,7 @@ With an MLX-LM build that supports repository-provided model adapters:
|
|
| 149 |
|
| 150 |
```bash
|
| 151 |
mlx_lm.generate \
|
| 152 |
-
--model
|
| 153 |
--trust-remote-code \
|
| 154 |
--prompt "Explain why hybrid linear attention is useful." \
|
| 155 |
--max-tokens 512 \
|
|
@@ -167,7 +172,7 @@ from mlx_lm import load, generate
|
|
| 167 |
|
| 168 |
|
| 169 |
model, tokenizer = load(
|
| 170 |
-
"
|
| 171 |
trust_remote_code=True,
|
| 172 |
tokenizer_config={"trust_remote_code": True},
|
| 173 |
)
|
|
@@ -253,14 +258,14 @@ This is a community conversion, not an official InclusionAI release. Validate qu
|
|
| 253 |
The upstream model declares the **MIT License** in its Hugging Face metadata. A standard MIT licence copy is included in this repository.
|
| 254 |
|
| 255 |
|
| 256 |
-
All model design, training, benchmark, and upstream documentation credit belongs to InclusionAI and the original contributors. The mixed-precision conversion, Apple-silicon validation, compatibility packaging, and model card are provided by [
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
-
<!--
|
| 261 |
## Choose for your Mac
|
| 262 |
|
| 263 |
-
[64GB Macs](https://huggingface.co/collections/
|
| 264 |
|
| 265 |
Published peak memory: **42.41 GB**; estimated starting tier: **64GB**, leaving about **21 GB** nominal headroom. The collections use published M3 Studio peaks with at least 25% nominal headroom; fit on other Macs is an estimate, and full context is not guaranteed. Start with short context and one request.
|
| 266 |
|
|
@@ -271,7 +276,7 @@ The exact tested oMLX application version is not recorded here; a library versio
|
|
| 271 |
### Quick start and demo prompt
|
| 272 |
|
| 273 |
```bash
|
| 274 |
-
hf download
|
| 275 |
```
|
| 276 |
|
| 277 |
Add the downloaded folder to oMLX model directories, refresh the list, and follow this card's architecture and MTP compatibility requirements before loading.
|
|
@@ -284,5 +289,5 @@ Explain why the sky looks blue in three short sentences.
|
|
| 284 |
|
| 285 |
This is a demo prompt to try, not a recorded successful run; a captured demonstration for this documentation update is not yet available.
|
| 286 |
|
| 287 |
-
[Follow
|
| 288 |
-
<!--
|
|
|
|
| 20 |
- oq2
|
| 21 |
---
|
| 22 |
|
| 23 |
+
<p align="center">
|
| 24 |
+
<a href="https://tensorfold.dev">
|
| 25 |
+
<img src="https://huggingface.co/spaces/TensorFold/README/resolve/main/tensorfold-logo.png" alt="TensorFold" width="160">
|
| 26 |
+
</a>
|
| 27 |
+
</p>
|
| 28 |
|
| 29 |
<p align="center">
|
| 30 |
<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*4QxcQrBlTiAAAAAAQXAAAAgAemJ7AQ/original" width="100" alt="Ling logo">
|
|
|
|
| 34 |
<p align="center">
|
| 35 |
<img src="https://img.shields.io/badge/InclusionAI-Ling-1677FF?style=for-the-badge" alt="InclusionAI Ling">
|
| 36 |
<img src="https://img.shields.io/badge/Apple_Silicon-MLX-000000?style=for-the-badge&logo=apple&logoColor=white" alt="Apple silicon MLX">
|
| 37 |
+
<img src="https://img.shields.io/badge/TensorFold-oMLX-6E56CF?style=for-the-badge&logo=huggingface&logoColor=white" alt="TensorFold oMLX">
|
| 38 |
</p>
|
| 39 |
|
| 40 |
|
|
|
|
| 116 |
|
| 117 |
|
| 118 |
```bash
|
| 119 |
+
hf download TensorFold/Ling-3.0-flash-oQ2 \
|
| 120 |
+
--local-dir ~/.omlx/models/TensorFold/Ling-3.0-flash-oQ2
|
| 121 |
```
|
| 122 |
|
| 123 |
|
|
|
|
| 154 |
|
| 155 |
```bash
|
| 156 |
mlx_lm.generate \
|
| 157 |
+
--model TensorFold/Ling-3.0-flash-oQ2 \
|
| 158 |
--trust-remote-code \
|
| 159 |
--prompt "Explain why hybrid linear attention is useful." \
|
| 160 |
--max-tokens 512 \
|
|
|
|
| 172 |
|
| 173 |
|
| 174 |
model, tokenizer = load(
|
| 175 |
+
"TensorFold/Ling-3.0-flash-oQ2",
|
| 176 |
trust_remote_code=True,
|
| 177 |
tokenizer_config={"trust_remote_code": True},
|
| 178 |
)
|
|
|
|
| 258 |
The upstream model declares the **MIT License** in its Hugging Face metadata. A standard MIT licence copy is included in this repository.
|
| 259 |
|
| 260 |
|
| 261 |
+
All model design, training, benchmark, and upstream documentation credit belongs to InclusionAI and the original contributors. The mixed-precision conversion, Apple-silicon validation, compatibility packaging, and model card are provided by [TensorFold](https://huggingface.co/TensorFold).
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
+
<!-- TensorFold-chooser-start -->
|
| 266 |
## Choose for your Mac
|
| 267 |
|
| 268 |
+
[64GB Macs](https://huggingface.co/collections/TensorFold/mlx-models-for-64gb-macs-6a9fefda17932216ec9ab457) 路 [128GB Macs](https://huggingface.co/collections/TensorFold/mlx-models-for-128gb-macs-6a9ff0abd31bc9abbe7922d7) 路 [256GB Macs](https://huggingface.co/collections/TensorFold/mlx-models-for-256gb-macs-6a9ff0ef9fed7c5bdca15e9b)
|
| 269 |
|
| 270 |
Published peak memory: **42.41 GB**; estimated starting tier: **64GB**, leaving about **21 GB** nominal headroom. The collections use published M3 Studio peaks with at least 25% nominal headroom; fit on other Macs is an estimate, and full context is not guaranteed. Start with short context and one request.
|
| 271 |
|
|
|
|
| 276 |
### Quick start and demo prompt
|
| 277 |
|
| 278 |
```bash
|
| 279 |
+
hf download TensorFold/Ling-3.0-flash-oQ2 --local-dir ./models/Ling-3.0-flash-oQ2
|
| 280 |
```
|
| 281 |
|
| 282 |
Add the downloaded folder to oMLX model directories, refresh the list, and follow this card's architecture and MTP compatibility requirements before loading.
|
|
|
|
| 289 |
|
| 290 |
This is a demo prompt to try, not a recorded successful run; a captured demonstration for this documentation update is not yet available.
|
| 291 |
|
| 292 |
+
[Follow TensorFold for new Apple Silicon releases and fixes.](https://huggingface.co/TensorFold)
|
| 293 |
+
<!-- TensorFold-chooser-end -->
|