Instructions to use toxzak/gemma4-e2b-exp-quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use toxzak/gemma4-e2b-exp-quant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="toxzak/gemma4-e2b-exp-quant")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("toxzak/gemma4-e2b-exp-quant", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use toxzak/gemma4-e2b-exp-quant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "toxzak/gemma4-e2b-exp-quant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "toxzak/gemma4-e2b-exp-quant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/toxzak/gemma4-e2b-exp-quant
- SGLang
How to use toxzak/gemma4-e2b-exp-quant 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 "toxzak/gemma4-e2b-exp-quant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "toxzak/gemma4-e2b-exp-quant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "toxzak/gemma4-e2b-exp-quant" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "toxzak/gemma4-e2b-exp-quant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use toxzak/gemma4-e2b-exp-quant with Docker Model Runner:
docker model run hf.co/toxzak/gemma4-e2b-exp-quant
Commit History
-
Add live BF16 baseline comparison results
Verified signature4c5636a -
Add full yaml metadata to README
Verified signature55c28df -
Add yaml metadata to README
Verified signature1a0d2b6 -
Add eval_results/error_budget_residual_scan_4layers_k16.json
Verified signature11d4f2a -
Add eval_results/error_budget_residual_20_layers.json
Verified signature44d2f63 -
Add eval_results/error_budget_residual_scan_4layers_g256_k18.json
Verified signature68450fe -
Add eval_results/error_budget_residual_scan_4layers_k8.json
Verified signature091cd2b -
Add eval_results/error_budget_residual_smoke.json
Verified signature279373c -
Add eval_results/error_budget_residual_20_layers_packed.json
Verified signature21fb31a -
Add eval_results/error_budget_residual_scan_8layers.json
Verified signaturee2526d7 -
Add eval_results/mixed_budget_scan_8layers_g128.json
Verified signatureeeff4cd -
Add eval_results/mixed_budget_scan_full_g128_target4p0.json
Verified signaturedfd6c01 -
Add eval_results/error_budget_residual_scan_4layers_g256_k16.json
Verified signature7e2b2b6 -
Add eval_results/mixed_budget_scan_8layers_g128_target4p0.json
Verified signature55e36ac -
Add eval_results/mixed_budget_scan_4layers_g128.json
Verified signaturee7da415 -
Add eval_results/error_budget_residual_colab_l4_summary.json
Verified signaturee71f6e1 -
Add CHANGELOG.md
Verified signaturea6b04a0 -
Add FAST_INT4_PIVOT.md
Verified signature199de17 -
Initial upload: mixed-budget sub-4-bit artifacts + perplexity result
Verified signature9c41926 -
initial commit
Verified signature2c9dbfc