Text Generation
MLX
mlx-lm
qwen3
lora
voice-agent
desktop-automation
flowcast
gemmaflow
cascade
apple-silicon
Instructions to use nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen" --prompt "Once upon a time"
- Atomic Chat
gemma-4-e2b-flowcast-v4-cascade-qwen · flowcast-v4-cascade-qwen
Flowcast v4 Track B2 is a cascade architecture for size-constrained deploys: a Qwen3-4B light adapter handles intent classification and dictation polish; flowcast-sota-v3 lazy-loads for automation planning.
Small hot path. Full automation when you need it.
Benchmarks (vs v3)
| Gate | v3 | B2 cascade | Δ |
|---|---|---|---|
| Core hard quality (117) | 100% | 100% | — |
| Expanded hard quality (170) | 99.4% | 99.4% | — |
| Core p50 latency | ~1002ms | ~999ms | ~same |
| Hot path disk | 2.5 GB | ~2.26 GB | Qwen only |
Distilled from v3 teacher labels on intent cases (Slack writable-focus fix).
Quick start (cascade)
pip install mlx-lm huggingface_hub
from huggingface_hub import snapshot_download
from gemmaflow_tune.production import create_cascade_runner
light = snapshot_download("nsalerni/gemma-4-e2b-flowcast-v4-cascade-qwen")
heavy = snapshot_download("nsalerni/gemma-4-e2b-flowcast-v3")
runner = create_cascade_runner(
light_adapter_path=light,
heavy_adapter_path=heavy,
)
runner.load()
# Intent/dictation routes to Qwen; automation lazy-loads v3 E2B
result = runner.generate("", user_content="...", suite="intent_classification", max_tokens=64)
print(result.text)
Files
| File | Description |
|---|---|
adapters.safetensors |
Qwen3 light LoRA weights |
adapter_config.json |
LoRA config + heavy adapter reference |
inference_config.json |
Cascade runtime settings + benchmark scores |
Recommended inference settings
{
"runner_kind": "cascade",
"prompt_mode": "hybrid_slim",
"json_early_stop": true,
"use_prompt_kv_cache": true,
"temperature": 0.02,
"top_p": 0.85
}
License
Apache 2.0. Base models subject to their respective licenses.
Hardware compatibility
Log In to add your hardware
Quantized