Instructions to use Asystemoffields/gemma4-pmra-orbitquant-safe3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Asystemoffields/gemma4-pmra-orbitquant-safe3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Asystemoffields/gemma4-pmra-orbitquant-safe3")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Asystemoffields/gemma4-pmra-orbitquant-safe3", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Asystemoffields/gemma4-pmra-orbitquant-safe3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Asystemoffields/gemma4-pmra-orbitquant-safe3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Asystemoffields/gemma4-pmra-orbitquant-safe3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Asystemoffields/gemma4-pmra-orbitquant-safe3
- SGLang
How to use Asystemoffields/gemma4-pmra-orbitquant-safe3 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 "Asystemoffields/gemma4-pmra-orbitquant-safe3" \ --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": "Asystemoffields/gemma4-pmra-orbitquant-safe3", "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 "Asystemoffields/gemma4-pmra-orbitquant-safe3" \ --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": "Asystemoffields/gemma4-pmra-orbitquant-safe3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Asystemoffields/gemma4-pmra-orbitquant-safe3 with Docker Model Runner:
docker model run hf.co/Asystemoffields/gemma4-pmra-orbitquant-safe3
| { | |
| "format": "gemma4-pmra-orbitquant-policy-v1", | |
| "created_utc": "2026-05-14T01:13:53.078680+00:00", | |
| "base_model": "google/gemma-4-E2B-it", | |
| "source_result": "C:\\Users\\power\\Documents\\Codex\\2026-05-12\\i-m-on-a-mission-to\\orbitquant\\results\\modal_gemma4_pmra_orbit_stack_trim128_safe3_latest.json", | |
| "source_profile": "trim128_safe3", | |
| "static_weight_state": { | |
| "method": "PMRA", | |
| "variant": "c2_calib_knapsack_mixed", | |
| "payload_bpw": 5.32661328956758, | |
| "payload_bytes": 3094396044 | |
| }, | |
| "selected_policy": { | |
| "name": "safe3", | |
| "total_buses": 10, | |
| "kv_layers": [ | |
| { | |
| "layer": 33, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 28, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 30, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 16, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 18, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 11, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| }, | |
| { | |
| "layer": 15, | |
| "bits": 3, | |
| "rotation": "hadamard", | |
| "alpha": 0.75 | |
| } | |
| ], | |
| "mlp_choices": [ | |
| { | |
| "layer": 20, | |
| "bits": 2, | |
| "primitive": "plus", | |
| "rotation": "preperm_activation_max_hadamard", | |
| "alpha": 0.375, | |
| "block_size": 512 | |
| }, | |
| { | |
| "layer": 19, | |
| "bits": 2, | |
| "primitive": "plus", | |
| "rotation": "preperm_activation_max_hadamard", | |
| "alpha": 0.375, | |
| "block_size": 512 | |
| }, | |
| { | |
| "layer": 6, | |
| "bits": 2, | |
| "primitive": "plus", | |
| "rotation": "preperm_boundary_rms_hadamard", | |
| "alpha": 0.375, | |
| "block_size": 512 | |
| } | |
| ] | |
| }, | |
| "evaluation": { | |
| "tokens": 24058, | |
| "dataset": "wikitext", | |
| "dataset_config": "wikitext-2-raw-v1", | |
| "prompt_count": 128, | |
| "calibration_prompt_count": 24, | |
| "eval_max_length": 192, | |
| "calib_max_length": 192, | |
| "pmra_nll": 12.818462451820967, | |
| "q3_k_s_nll": 18.04630691050413, | |
| "stack_nll": 12.834082924860832, | |
| "delta_nll_vs_pmra": 0.015620473039865246, | |
| "delta_nll_vs_q3_k_s": -5.212223985643297, | |
| "last_logit_mse_to_fp16": 67.99472899734974, | |
| "top10_overlap_to_fp16": 0.13593750000000002, | |
| "runtime_savings_estimate": { | |
| "context_length": 8192, | |
| "mlp_lifetime_tokens": 64, | |
| "kv_saved_mib": 45.5, | |
| "mlp_saved_mib": 3.28125, | |
| "total_saved_mib": 48.78125, | |
| "mlp_dims": [ | |
| 12288, | |
| 12288, | |
| 6144 | |
| ] | |
| } | |
| }, | |
| "method": { | |
| "kv_cache": "Rotate K/V activations with Hadamard before 3-bit scalar quantization.", | |
| "mlp_intermediate": "Rotate Gemma4 MLP intermediate activations before calibrated 2-bit quantization, then invert before down_proj.", | |
| "calibration": "Hadamard-plus MLP choices reconstruct prepermutation order from calibration activations and down-proj weights." | |
| } | |
| } |