Text Generation
MLX
Safetensors
English
lfm2
fact-extraction
structured-extraction
on-device
memory
conversational
8-bit precision
Instructions to use mindi-dev/experience-extractor-1.2b-v1-mlx-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mindi-dev/experience-extractor-1.2b-v1-mlx-8bit 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("mindi-dev/experience-extractor-1.2b-v1-mlx-8bit") 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 mindi-dev/experience-extractor-1.2b-v1-mlx-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mindi-dev/experience-extractor-1.2b-v1-mlx-8bit 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 "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit"
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 mindi-dev/experience-extractor-1.2b-v1-mlx-8bit
Run Hermes
hermes
- OpenClaw new
How to use mindi-dev/experience-extractor-1.2b-v1-mlx-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit"
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 "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit" \ --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"
- MLX LM
How to use mindi-dev/experience-extractor-1.2b-v1-mlx-8bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mindi-dev/experience-extractor-1.2b-v1-mlx-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
File size: 3,291 Bytes
fe69648 7fc741a fe69648 7fc741a fe69648 7fc741a fe69648 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | ---
license: other
license_name: lfm1.0
license_link: https://huggingface.co/LiquidAI/LFM2-1.2B-Extract/blob/main/LICENSE
base_model: LiquidAI/LFM2-1.2B-Extract
language:
- en
tags:
- mlx
- lfm2
- fact-extraction
- structured-extraction
- on-device
- memory
pipeline_tag: text-generation
library_name: mlx
---
# experience-extractor-1.2b-v1 (MLX 8-bit)
A small, **on-device structured fact extractor** for memory engines, fine-tuned from
[`LiquidAI/LFM2-1.2B-Extract`](https://huggingface.co/LiquidAI/LFM2-1.2B-Extract) (LoRA (rank 32) fine-tune (mlx-lm)). It reads a chat transcript and emits every
storable fact as JSON in a fixed **8-field schema**:
```json
{"facts": [
{"what": "...", "when": null, "where": null, "why": null,
"who": ["..."], "fact_type": "world|experience",
"entities": ["..."], "message_refs": ["id:m07"]}
]}
```
It powers the [`experience`](https://github.com/mindi-dev/experience) memory engine
(`EXPERIENCE_EXTRACTOR=lfm25`). This repo holds the **MLX 8-bit** build for fast inference on Apple Silicon via Ollama's MLX engine or `mlx-lm`.
## Evaluation (LongMemEval-cleaned "KU", content-recall)
> **Run it windowed.** Whole-transcript extraction caps a small model near 0.62; sliding a
> **5-message window** and unioning the per-window facts is the recall mechanism and the
> recommended deploy mode. Pairing the 350M + 1.2B as an **ensemble** reaches ~0.986 on KU.
| mode | recall | mean facts/row | repeat |
|---|---|---|---|
| **5-msg windowed** (recommended) | **0.958** | ~45 | high (use dedup) |
| 5-msg windowed + semantic dedup@0.6 | 0.931 | ~15 | ~0.16 (clean) |
| whole-transcript (single pass) | 0.389 — *free decoding understates; use windowing* | low | low |
> **This MLX 8-bit build, measured:** windowed **0.958** (= the GGUF), dedup@0.6 0.931. The low whole-transcript 0.389 is a free-decoding artifact, not quant loss — windowing recovers it.
## Files
- MLX 8-bit model (`config.json`, `model.safetensors`, tokenizer, chat template); 1.2 GB.
## Usage
**Ollama** (MLX engine, Apple Silicon):
```sh
ollama run hf.co/mindi-dev/experience-extractor-1.2b-v1-mlx-8bit
```
**mlx-lm**: `mlx_lm.generate --model mindi-dev/experience-extractor-1.2b-v1-mlx-8bit --prompt "<transcript>"`
For the recall numbers above, drive it **windowed** (5-msg sliding window + union + dedup) —
e.g. via the experience crate's `EXPERIENCE_EXTRACTION_WINDOW=5`. A single whole-transcript
pass under free decoding scores lower.
## Other formats
- GGUF (llama.cpp / Ollama / crate): [`mindi-dev/experience-extractor-1.2b-v1-GGUF`](https://huggingface.co/mindi-dev/experience-extractor-1.2b-v1-GGUF)
## Training
Full pipeline at [mindi-dev/experience](https://github.com/mindi-dev/experience) (`training/`).
Fine-tuned on real-distribution LongMemEval transcripts (leakage-safe; held-out KU never
trained on) with grounded teacher-generated labels.
## License
Fine-tune of [`LiquidAI/LFM2-1.2B-Extract`](https://huggingface.co/LiquidAI/LFM2-1.2B-Extract) under the **LFM Open License v1.0**.
Redistribution permitted with attribution + change notice; **commercial use by entities with
≥ US$10M revenue requires a Liquid AI commercial license** (Sec. 5). The crate code is MIT and
separate. See `NOTICE.md` and the full `LICENSE` in this repo.
|