Text Generation
MLX
Safetensors
Chinese
English
qwen3_moe
qwen3
Mixture of Experts
children
companion
chinese
conversational
4-bit precision
Instructions to use assassindesign/Elly-768-MoE-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use assassindesign/Elly-768-MoE-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("assassindesign/Elly-768-MoE-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 assassindesign/Elly-768-MoE-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 "assassindesign/Elly-768-MoE-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": "assassindesign/Elly-768-MoE-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use assassindesign/Elly-768-MoE-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 "assassindesign/Elly-768-MoE-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "assassindesign/Elly-768-MoE-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "assassindesign/Elly-768-MoE-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use assassindesign/Elly-768-MoE-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 "assassindesign/Elly-768-MoE-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 assassindesign/Elly-768-MoE-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use assassindesign/Elly-768-MoE-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 "assassindesign/Elly-768-MoE-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 "assassindesign/Elly-768-MoE-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"
Elly-768-MoE-4bit (MLX)
儿童陪伴对话小模型 Elly 的 MLX 4bit 量化版,供 Apple Silicon(iPhone / iPad / Mac)设备离线推理使用。
A tiny Chinese children-companion chat model (Elly persona) converted to MLX 4-bit for on-device inference on Apple Silicon.
模型简介 / Overview
- 架构:MiniMind 版 Qwen3MoE(MoE,混合专家)
- 参数规模:**~198M**(0.2B,超轻量,可跑在早期 “iPhone12” 上)
- 用途:儿童陪伴对话,角色「Elly」,面向学龄前/低龄儿童
- 语言:简体中文(词表 6400)
| 配置项 | 值 |
|---|---|
| hidden_size | 768 |
| num_hidden_layers | 8 |
| num_attention_heads | 8 |
| num_key_value_heads | 4 |
| intermediate_size | 2432 |
| moe_intermediate_size | 2432 |
| num_local_experts (routed) | 4 |
| num_experts_per_tok | 1 |
| vocab_size | 6400 |
| max_position_embeddings | 32768 |
| rope_theta | 1e6 |
| 参数量 | 198.4M |
量化信息 / Quantization
- 格式:MLX
safetensors - 量化:4-bit(
--q-bits 4,group_size 64,affine) - 部分层(norm / gate 等)以 8bit 保留,实测约 4.5 bits/weight
- 模型文件约 106 MB
使用方法 / Usage
1. 安装
pip install mlx-lm
2. 命令行生成
python3 -m mlx_lm generate \
--model <USERNAME>/Elly-768-MoE-4bit \
--system-prompt "你是 Elly,一个温柔可爱的儿童陪伴小助手,正在和小朋友聊天。" \
--prompt "你好呀,Elly" \
--temp 0 \
--max-tokens 150
3. Python API
from mlx_lm import load, generate
model, tokenizer = load("<USERNAME>/Elly-768-MoE-4bit")
messages = [
{"role": "system", "content": "你是 Elly,一个温柔可爱的儿童陪伴小助手。"},
{"role": "user", "content": "你好呀,Elly"},
]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, temp=0.0, max_tokens=150)
print(response)
4. Swift(App 端)
使用 mlx-swift-lm 加载:
let modelDirName = "Elly-768-MoE-4bit" // 置于 App Bundle 的 Models 目录
let engine = MLXQwenEngine(modelDirName: modelDirName)
建议使用贪婪解码(
do_sample=false),repetition_penalty=1.1,max_new_tokens=150。
训练背景 / Training
- 底座:MiniMind 系列 Qwen3MoE 小模型预训练权重(
pretrain_768_moe) - 微调:全参 SFT,儿童陪伴对话数据(含儿童安全、隐私保护、情绪陪伴等场景)
- 词表:6400(MiniMind 中文小词表)
免责声明 / Disclaimer
本模型面向儿童陪伴场景,输出不构成医疗、心理或安全方面的专业建议。请由家长/监护人监督儿童使用。
- Downloads last month
- -
Model size
31M params
Tensor type
F16
·
U32 ·
Hardware compatibility
Log In to add your hardware
4-bit