Qwenjamin Franklin V2
Collection
Qwen 3.5 9b Distill fix tool_schema_canary and full 40 eval crush • 2 items • Updated
How to use stamsam/Qwenjamin_Franklin_V2_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("stamsam/Qwenjamin_Franklin_V2_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)How to use stamsam/Qwenjamin_Franklin_V2_4bit with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "stamsam/Qwenjamin_Franklin_V2_4bit"
# 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": "stamsam/Qwenjamin_Franklin_V2_4bit"
}
]
}
}
}# Start Pi in your project directory: pi
How to use stamsam/Qwenjamin_Franklin_V2_4bit with Hermes Agent:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "stamsam/Qwenjamin_Franklin_V2_4bit"
# 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 stamsam/Qwenjamin_Franklin_V2_4bit
hermes
How to use stamsam/Qwenjamin_Franklin_V2_4bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "stamsam/Qwenjamin_Franklin_V2_4bit"
# Install MLX LM
uv tool install mlx-lm
# Start the server
mlx_lm.server --model "stamsam/Qwenjamin_Franklin_V2_4bit"
# Calling the OpenAI-compatible server with curl
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "stamsam/Qwenjamin_Franklin_V2_4bit",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Qwenjamin Franklin V2 4bit is the compact MLX export of the second-generation Qwenjamin Franklin workshop release.
It keeps the V2 tuning goals for stronger everyday reasoning, stricter JSON and tool behavior, and more reliable false-premise correction while shrinking the footprint for local Apple Silicon use.
This repo is the 4-bit sibling of stamsam/Qwenjamin_Franklin_V2. If you want the full fused PyTorch release and its benchmark table, use that repo instead.
Qwen/Qwen3.5-9Bv55 targeted SFTpip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("stamsam/Qwenjamin_Franklin_V2_4bit")
prompt = "hello"
if tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_dict=False,
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
python -m mlx_lm generate \
--model stamsam/Qwenjamin_Franklin_V2_4bit \
--prompt "Return only valid JSON." \
--max-tokens 256 \
--temp 0.0
stamsam/Qwenjamin_Franklin_V2.4-bit