Instructions to use sevren-ai/Embla1-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use sevren-ai/Embla1-4bit 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("sevren-ai/Embla1-4bit") 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 sevren-ai/Embla1-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sevren-ai/Embla1-4bit"
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": "sevren-ai/Embla1-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use sevren-ai/Embla1-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "sevren-ai/Embla1-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "sevren-ai/Embla1-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sevren-ai/Embla1-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use sevren-ai/Embla1-4bit 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 "sevren-ai/Embla1-4bit"
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 sevren-ai/Embla1-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sevren-ai/Embla1-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "sevren-ai/Embla1-4bit"
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 "sevren-ai/Embla1-4bit" \ --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"
sevren-ai/Embla1-4bit
Embla 1 (sevren.ai) is a mixture-of-experts language model designed for phones. This repository contains the MLX 4-bit checkpoint (affine, group size 64, bf16 scales and biases): the exact weights used by the phone build.
The 4-bit format is the intended precision. Embla 1 was post-trained with quantization-aware training (QAT) specifically for this format, so these are the weights the training targeted. They are produced by quantizing the bf16 checkpoint sevren-ai/Embla1-bf16 with round-to-nearest.
Model details
- Parameters: 10B total, including 3B engram parameters; 1B active per token.
- Context length: 256K tokens (262,144).
- License: MIT.
Runtime
embla-metal is our optimized runtime for iPhones and Apple silicon Macs. This Metal decode engine is built for the checkpoint: it memory-maps the 4-bit weights directly into Metal and reads the engram table from storage.
Layout
model.safetensors: the quantized layout used by mlx-lm. A quantized module holds<module>.weight(uint32, with eight 4-bit codes packed per word),<module>.scales, and<module>.biases(bf16, one per 64 inputs). Reconstruct a weight withmx.dequantize(weight, scales, biases, group_size=64, bits=4). Routers, expert biases, norm gains, AttnRes queries, and the engram conv remain in bf16.- The 96 routed experts in each layer are stored as two stacks:
mlp.experts_fc[E, f, d]andmlp.experts_proj[E, d, f]. engram_table.safetensors: the engram's 23,488,192 x 128 rows, quantized the same way but with fp16 scales and biases (the phone's format). To recover the trained row exactly, cast a row's scale and bias to fp32, dequantize, and round to bf16. Usingmx.dequantizein fp16 is one bf16 step off for a few percent of values.config.json: the architecture description (model_type: embla, identical to the transformers release) and mlx-lm'squantizationblock, with the routers listed as unquantized.
mlx-lm does not currently support embla, so this checkpoint does not load through mlx_lm.load. The transformers release (bf16, with reference model code) is the authoritative definition of the math.
- Downloads last month
- 106
4-bit