Text Generation
MLX
Safetensors
qwen3_5
user-representation
user-simulation
conversational
8-bit precision
Instructions to use xquantize/userrepgen-4b-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use xquantize/userrepgen-4b-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("xquantize/userrepgen-4b-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 xquantize/userrepgen-4b-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 "xquantize/userrepgen-4b-8bit"
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": "xquantize/userrepgen-4b-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use xquantize/userrepgen-4b-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 "xquantize/userrepgen-4b-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "xquantize/userrepgen-4b-8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xquantize/userrepgen-4b-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use xquantize/userrepgen-4b-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 "xquantize/userrepgen-4b-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 xquantize/userrepgen-4b-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use xquantize/userrepgen-4b-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 "xquantize/userrepgen-4b-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 "xquantize/userrepgen-4b-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"
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ tags:
|
|
| 12 |
|
| 13 |
# userrepgen-4b-8bit (MLX)
|
| 14 |
|
| 15 |
-
8-bit MLX conversion of [microsoft/UserRepGen-4B](https://huggingface.co/microsoft/UserRepGen-4B) for Apple Silicon. Text-only (vision weights not included).
|
| 16 |
|
| 17 |
UserRepGen-4B reads a multi-turn user–assistant conversation and outputs a JSON description of the user: their `task` and their `user_behavior`. It is not a chatbot.
|
| 18 |
|
|
@@ -48,13 +48,16 @@ print(json.loads(out))
|
|
| 48 |
|
| 49 |
Tested against the original bf16 weights (also run in MLX) on 5 varied conversations (Excel help, Python debugging, travel planning, writing edits, health question), using greedy decoding as in Microsoft's reference script.
|
| 50 |
|
| 51 |
-
| Version | Valid JSON | Outputs with repeated sentences |
|
| 52 |
-
|---|---|---|
|
| 53 |
-
| bf16 (original) | 5/5 | 0/5 |
|
| 54 |
-
| **8-bit (this repo)** | **5/5** | 1/5 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
|
| 59 |
## Details
|
| 60 |
|
|
|
|
| 12 |
|
| 13 |
# userrepgen-4b-8bit (MLX)
|
| 14 |
|
| 15 |
+
8-bit MLX conversion of [microsoft/UserRepGen-4B](https://huggingface.co/microsoft/UserRepGen-4B) for Apple Silicon. Text-only (vision weights not included). A smaller [6-bit version](https://huggingface.co/xquantize/userrepgen-4b-6bit) performed just as well in testing and is the recommended choice for most users.
|
| 16 |
|
| 17 |
UserRepGen-4B reads a multi-turn user–assistant conversation and outputs a JSON description of the user: their `task` and their `user_behavior`. It is not a chatbot.
|
| 18 |
|
|
|
|
| 48 |
|
| 49 |
Tested against the original bf16 weights (also run in MLX) on 5 varied conversations (Excel help, Python debugging, travel planning, writing edits, health question), using greedy decoding as in Microsoft's reference script.
|
| 50 |
|
| 51 |
+
| Version | Bits/weight | Valid JSON | Outputs with repeated sentences |
|
| 52 |
+
|---|---|---|---|
|
| 53 |
+
| bf16 (original) | 16 | 5/5 | 0/5 |
|
| 54 |
+
| **8-bit (this repo)** | **8.5** | **5/5** | **1/5** |
|
| 55 |
+
| 6-bit | 6.5 | 5/5 | 0/5 |
|
| 56 |
+
| 4-bit, group size 32 | 5.0 | 4/5 | 1/5 |
|
| 57 |
+
| 4-bit, mixed 4/6 | 4.7 | 3/5 | 2/5 |
|
| 58 |
+
| 4-bit (plain) | 4.5 | 3/5 | 1/5 |
|
| 59 |
|
| 60 |
+
**4-bit is not recommended for this model.** All three 4-bit variants tested broke on at least one conversation, falling into long repetition loops that produced invalid JSON. 6-bit and 8-bit both matched bf16; the 8-bit's one repeated sentence (on the Excel example) still produced valid JSON, and the difference between 6-bit and 8-bit is within noise for a test this small.
|
| 61 |
|
| 62 |
## Details
|
| 63 |
|