Instructions to use Johnblick187/grok-zero-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Johnblick187/grok-zero-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Johnblick187/grok-zero-fp8", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Johnblick187/grok-zero-fp8", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Johnblick187/grok-zero-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Johnblick187/grok-zero-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Johnblick187/grok-zero-fp8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Johnblick187/grok-zero-fp8
- SGLang
How to use Johnblick187/grok-zero-fp8 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 "Johnblick187/grok-zero-fp8" \ --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": "Johnblick187/grok-zero-fp8", "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 "Johnblick187/grok-zero-fp8" \ --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": "Johnblick187/grok-zero-fp8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Johnblick187/grok-zero-fp8 with Docker Model Runner:
docker model run hf.co/Johnblick187/grok-zero-fp8
| { | |
| "architectures": [ | |
| "Grok1ForCausalLM" | |
| ], | |
| "attn_factor": 1.0, | |
| "attn_logit_softcapping": 30.0, | |
| "attn_temperature_len": 1024, | |
| "auto_map": { | |
| "AutoConfig": "modeling_grok2.Grok2Config", | |
| "AutoModelForCausalLM": "modeling_grok2.Grok1ForCausalLM" | |
| }, | |
| "beta_fast": 8, | |
| "beta_slow": 1, | |
| "embedding_multiplier_scale": 90.50966799187809, | |
| "extrapolation_factor": 1.0, | |
| "final_logit_softcapping": 50, | |
| "global_attn_every_n": 1, | |
| "head_dim": 128, | |
| "hidden_size": 8192, | |
| "intermediate_size": 32768, | |
| "max_position_embeddings": 131072, | |
| "model_type": "grok2", | |
| "moe_intermediate_size": 16384, | |
| "num_attention_heads": 64, | |
| "num_experts_per_tok": 2, | |
| "num_hidden_layers": 64, | |
| "num_key_value_heads": 8, | |
| "num_local_experts": 8, | |
| "original_max_position_embeddings": 8192, | |
| "output_multiplier_scale": 0.5, | |
| "quantization_config": { | |
| "config_groups": { | |
| "FP8_DYNAMIC": { | |
| "format": "float-quantized", | |
| "input_activations": { | |
| "actorder": null, | |
| "block_structure": null, | |
| "dynamic": true, | |
| "group_size": null, | |
| "num_bits": 8, | |
| "observer": null, | |
| "observer_kwargs": {}, | |
| "scale_dtype": null, | |
| "strategy": "token", | |
| "symmetric": true, | |
| "type": "float", | |
| "zp_dtype": null | |
| }, | |
| "output_activations": null, | |
| "targets": [ | |
| "Linear" | |
| ], | |
| "weights": { | |
| "actorder": null, | |
| "block_structure": null, | |
| "dynamic": false, | |
| "group_size": null, | |
| "num_bits": 8, | |
| "observer": "memoryless_minmax", | |
| "observer_kwargs": {}, | |
| "scale_dtype": null, | |
| "strategy": "channel", | |
| "symmetric": true, | |
| "type": "float", | |
| "zp_dtype": null | |
| } | |
| } | |
| }, | |
| "format": "float-quantized", | |
| "global_compression_ratio": null, | |
| "ignore": [ | |
| "lm_head", | |
| "model.layers.40.block_sparse_moe.gate", | |
| "model.layers.62.block_sparse_moe.gate", | |
| "model.layers.30.block_sparse_moe.gate", | |
| "model.layers.52.block_sparse_moe.gate", | |
| "model.layers.15.block_sparse_moe.gate", | |
| "model.layers.35.block_sparse_moe.gate", | |
| "model.layers.50.block_sparse_moe.gate", | |
| "model.layers.53.block_sparse_moe.gate", | |
| "model.layers.29.block_sparse_moe.gate", | |
| "model.layers.57.block_sparse_moe.gate", | |
| "model.layers.42.block_sparse_moe.gate", | |
| "model.layers.60.block_sparse_moe.gate", | |
| "model.layers.31.block_sparse_moe.gate", | |
| "model.layers.36.block_sparse_moe.gate", | |
| "model.layers.48.block_sparse_moe.gate", | |
| "model.layers.11.block_sparse_moe.gate", | |
| "model.layers.19.block_sparse_moe.gate", | |
| "model.layers.45.block_sparse_moe.gate", | |
| "model.layers.7.block_sparse_moe.gate", | |
| "model.layers.51.block_sparse_moe.gate", | |
| "model.layers.56.block_sparse_moe.gate", | |
| "model.layers.17.block_sparse_moe.gate", | |
| "model.layers.49.block_sparse_moe.gate", | |
| "model.layers.16.block_sparse_moe.gate", | |
| "model.layers.6.block_sparse_moe.gate", | |
| "model.layers.27.block_sparse_moe.gate", | |
| "model.layers.61.block_sparse_moe.gate", | |
| "model.layers.23.block_sparse_moe.gate", | |
| "model.layers.63.block_sparse_moe.gate", | |
| "model.layers.34.block_sparse_moe.gate", | |
| "model.layers.22.block_sparse_moe.gate", | |
| "model.layers.37.block_sparse_moe.gate", | |
| "model.layers.39.block_sparse_moe.gate", | |
| "model.layers.20.block_sparse_moe.gate", | |
| "model.layers.32.block_sparse_moe.gate", | |
| "model.layers.13.block_sparse_moe.gate", | |
| "model.layers.58.block_sparse_moe.gate", | |
| "model.layers.43.block_sparse_moe.gate", | |
| "model.layers.14.block_sparse_moe.gate", | |
| "model.layers.8.block_sparse_moe.gate", | |
| "model.layers.18.block_sparse_moe.gate", | |
| "model.layers.24.block_sparse_moe.gate", | |
| "model.layers.54.block_sparse_moe.gate", | |
| "model.layers.26.block_sparse_moe.gate", | |
| "model.layers.33.block_sparse_moe.gate", | |
| "model.layers.41.block_sparse_moe.gate", | |
| "model.layers.38.block_sparse_moe.gate", | |
| "model.layers.47.block_sparse_moe.gate", | |
| "model.layers.9.block_sparse_moe.gate", | |
| "model.layers.12.block_sparse_moe.gate", | |
| "model.layers.10.block_sparse_moe.gate", | |
| "model.layers.46.block_sparse_moe.gate", | |
| "model.layers.25.block_sparse_moe.gate", | |
| "model.layers.21.block_sparse_moe.gate", | |
| "model.layers.28.block_sparse_moe.gate", | |
| "model.layers.44.block_sparse_moe.gate", | |
| "model.layers.59.block_sparse_moe.gate", | |
| "model.embed_tokens", | |
| "model.layers.55.block_sparse_moe.gate" | |
| ], | |
| "kv_cache_scheme": null, | |
| "quant_method": "compressed-tensors", | |
| "quantization_status": "compressed", | |
| "sparsity_config": {}, | |
| "transform_config": {}, | |
| "version": "0.14.0.1" | |
| }, | |
| "residual_moe": true, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 208533496, | |
| "rope_type": "original", | |
| "router_logit_softcapping": 30.0, | |
| "scaling_factor": 16.0, | |
| "sliding_window_size": -1, | |
| "torch_dtype": "bfloat16", | |
| "vocab_size": 131072 | |
| } |