Text Generation
Transformers
Safetensors
qwen3_mamba3
linear-attention
mamba3
mamba-3
ssm
hybrid
distillation
qwen3
conversational
custom_code
Instructions to use arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0
- SGLang
How to use arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0 with Docker Model Runner:
docker model run hf.co/arianraje/qwen3-4b-mamba3-hybrid-stage2b-kd-bias0
| { | |
| "config": { | |
| "teacher": "/mnt/home/DDN_Copy/cornell/afei1/hf_cache/hub/models--Qwen--Qwen3-4B/snapshots/1cfa9a7208912126459214e8b04321603b3df60c", | |
| "student": "/mnt/home/DDN_Copy/cornell/afei1/checkpoints/qwen3-4b-mamba3-u4-stage2a-v0", | |
| "data_dir": "/mnt/home/DDN_Copy/cornell/afei1/data/stage2b_mix_v1", | |
| "output_dir": "/mnt/home/DDN_Copy/cornell/afei1/checkpoints/qwen3-4b-mamba3-u4-stage2b-v0", | |
| "train_tokens": 294000000, | |
| "global_batch_tokens": 2097152, | |
| "micro_batch": 1, | |
| "seq_len": 32768, | |
| "logit_chunk": 2048, | |
| "lr_gdn": 0.0001, | |
| "lr_inherited": 1e-05, | |
| "min_lr_frac": 0.1, | |
| "warmup_frac": 0.03, | |
| "weight_decay": 0.0, | |
| "betas": [ | |
| 0.9, | |
| 0.95 | |
| ], | |
| "grad_clip": 1.0, | |
| "grad_checkpoint": true, | |
| "run_name": "mamba3-stage2b-kd-v0", | |
| "wandb_project": "qwen3-mamba3-linearization", | |
| "wandb_group": "stage2b-kd", | |
| "log_every": 1, | |
| "eval_every": 10, | |
| "eval_batches": 16, | |
| "ppl_windows": 8, | |
| "ppl_ctx": 4096, | |
| "save_every": 15, | |
| "save_model": true, | |
| "resume": true, | |
| "attn_implementation": "", | |
| "offload_optimizer": false | |
| }, | |
| "final_val": { | |
| "kl": 0.20212099963100627, | |
| "top1_agree": 0.8055686950683594 | |
| }, | |
| "wandb_id": "jdm9eury", | |
| "finished": "2026-09-10 18:30:44" | |
| } |