Instructions to use ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX 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("ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX") 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 ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX"
Configure the model in Pi
# 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": "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX 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 "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX"
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 ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX
Run Hermes
hermes
- MLX LM
How to use ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
FastContext-1.0-4B-SFT MLX Dynamic 4-to-6-bit
MLX conversion of microsoft/FastContext-1.0-4B-SFT, quantized with mlx_lm.dynamic_quant.
Quantization
- Method: MLX-LM dynamic mixed precision
- Target:
5.0bits per weight - Actual:
4.984bits per weight - Low precision: 4-bit, group size 64
- High precision: 6-bit, group size 64
- Source revision:
80b60c036a612354e7c611cdabc005ec67f76993
Local Evaluation
Short-context evaluation command:
mlx_lm.perplexity \
--model ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX \
--num-samples 64 \
--sequence-length 512
Longer-context evaluation command:
mlx_lm.perplexity \
--model ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX \
--num-samples 32 \
--sequence-length 2048
Results on allenai/tulu-3-sft-mixture:
| Model | Seq len | Samples | Size | Peak memory | Perplexity |
|---|---|---|---|---|---|
| BF16 MLX | 512 | 64 | 7.5G | 12.34 GB | 7.732 +/- 0.121 |
| Dynamic 4-to-6-bit | 512 | 64 | 2.3G | 6.80 GB | 7.956 +/- 0.125 |
| BF16 MLX | 2048 | 32 | 7.5G | 24.28 GB | 4.258 +/- 0.041 |
| Dynamic 4-to-6-bit | 2048 | 32 | 2.3G | 18.74 GB | 4.349 +/- 0.042 |
Quantization run reported calibration PPL 8.025 -> 8.300 and peak quantization memory 38.217GB.
Usage
mlx_lm.generate \
--model ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX \
--prompt "Explain what repository exploration means." \
--max-tokens 128 \
--temp 0.0
- Downloads last month
- 340
Model size
0.7B params
Tensor type
BF16
·
U32 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for ukint-vs/FastContext-1.0-4B-SFT-Dynamic-4bit-MLX
Base model
Qwen/Qwen3-4B-Instruct-2507 Finetuned
microsoft/FastContext-1.0-4B-SFT