Instructions to use AIXF/sbzhanzhang with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AIXF/sbzhanzhang 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("AIXF/sbzhanzhang") 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 AIXF/sbzhanzhang with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "AIXF/sbzhanzhang"
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": "AIXF/sbzhanzhang" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use AIXF/sbzhanzhang with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "AIXF/sbzhanzhang"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "AIXF/sbzhanzhang" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AIXF/sbzhanzhang", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use AIXF/sbzhanzhang 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 "AIXF/sbzhanzhang"
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 AIXF/sbzhanzhang
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AIXF/sbzhanzhang with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "AIXF/sbzhanzhang"
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 "AIXF/sbzhanzhang" \ --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"
sb痛失姓名的站长
基于 Qwen3.5-4B,使用 linux.sb 用户「痛失姓名的站长」(UID 1)的可访问帖子和回帖进行文本 QLoRA 微调。模型是风格模拟,不是本人,不代表本人观点;输出可能编造事实。
文件与兼容性
根目录为已融合最佳适配器的 MLX 4 位量化文本模型,适用于 Apple Silicon 与 MLX-LM。不是 Transformers BF16 或 GGUF 权重,不能直接按普通 PyTorch 模型加载。adapter/ 中为 MLX 格式适配器,也不是 PEFT 格式。
训练使用 mlx-community/Qwen3.5-4B-MLX-4bit,当前环境为 mlx-lm 0.32.0、mlx 0.32.3。只验证了文本推理,不提供视觉推理。
MLX 使用
pip install mlx-lm
hf download AIXF/sbzhanzhang --local-dir sbzhanzhang
mlx_lm.generate --model ./sbzhanzhang --max-tokens 160 --prompt '在「错误地方」版块发一个新帖。话题:分享自己的小项目'
使用 system-prompt.txt 作为对话 system prompt,且设置 enable_thinking=False。仓库聊天模板默认禁用思考,与训练时格式一致。
回帖输入示例:
话题:社区最近有点冷清
版块:错误地方
[楼主 路人甲] 最近大家都只跟AI聊天,不来论坛发帖了。
Ollama
在支持此 MLX/Qwen3.5 导入格式的 Ollama 中:
cd sbzhanzhang
ollama create sbzhanzhang -f Modelfile
ollama run sbzhanzhang --think=false
已在 macOS Ollama 0.35.1 验证导入与 API/终端文本生成。Ollama 显示模型约 2.4 GB。Linux CPU/CUDA 推理、其他 Ollama 版本及云端部署未验证。
数据与训练
采集到 220 篇主帖、2735 条完整回帖,另有 2 条回帖正文不可用。清洗签名和界面标记,空正文、重复样本及超过长度预算的记录不训练。其他参与者仅作为输入上下文。
按主题互斥划分:训练 2493 条,验证 275 条,测试 156 条。原始帖子、上下文、训练样本未在本仓库发布。
- QLoRA:最后 8 层,rank 8,scale 16,dropout 0.05
- 模块:self_attn.q_proj/v_proj,mlp.gate_proj/up_proj/down_proj
- batch size 1;序列上限 512;梯度检查点;仅回答部分计算损失
- AdamW;学习率 1e-4;seed 42
- 1 epoch,共 2493 微批更新,Apple M4 16 GB,耗时约 2 小时 20 分钟
- 每 250 步抽取 32 个验证批次评估;选择验证损失最低的权重
最佳权重为第 1500 步开始前保存,即完成 1499 次更新。最佳抽样验证损失 2.6965;选中权重在全部 156 条保留测试样本上的损失 2.863,困惑度 17.510。验证只使用抽样批次,未做完整基座对照或人工风格评估;这些指标不等于事实正确率。
许可与署名
模型权重和本仓库代码按 Apache-2.0 发布,继承 Qwen3.5-4B 的许可与来源署名。此声明不授予第三方论坛帖子、头像、昵称或个人身份的权利。仓库不包含原始语料或头像。
- Downloads last month
- 87
4-bit