Instructions to use hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4/resolve/main/config.json
- Command line
-
hf download hf://hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4/config.json
-
curl -L -o config.json https://huggingface.co/hf-internal-testing/tiny-random-Mistral4-fp8-nvfp4/resolve/main/config.json
2.15 kB
| { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "first_k_dense_replace": 0, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 256, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 512, | |
| "kv_lora_rank": 64, | |
| "max_position_embeddings": 1048576, | |
| "model_type": "mistral4", | |
| "moe_intermediate_size": 256, | |
| "n_group": 1, | |
| "n_routed_experts": 4, | |
| "n_shared_experts": 1, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 2, | |
| "num_experts_per_tok": 2, | |
| "num_hidden_layers": 2, | |
| "num_key_value_heads": 2, | |
| "output_router_logits": false, | |
| "pad_token_id": 11, | |
| "pretraining_tp": 1, | |
| "q_lora_rank": 64, | |
| "qk_head_dim": 64, | |
| "qk_nope_head_dim": 32, | |
| "qk_rope_head_dim": 32, | |
| "quantization_config": { | |
| "*.mlp.experts.*": { | |
| "activation_scheme": "dynamic", | |
| "dequantize": false, | |
| "expert_dtype": "fp8", | |
| "modules_to_convert": null, | |
| "modules_to_not_convert": null, | |
| "quant_method": "fp8", | |
| "scale_fmt": "float", | |
| "weight_block_size": [ | |
| 128, | |
| 128 | |
| ] | |
| }, | |
| "*.mlp.shared_experts.*": { | |
| "dequantize": false, | |
| "modules_to_not_convert": null, | |
| "quant_method": "nvfp4" | |
| }, | |
| "*.self_attn.*_proj*": { | |
| "activation_scheme": "dynamic", | |
| "dequantize": false, | |
| "expert_dtype": "fp8", | |
| "modules_to_convert": null, | |
| "modules_to_not_convert": null, | |
| "quant_method": "fp8", | |
| "scale_fmt": "float", | |
| "weight_block_size": [ | |
| 32, | |
| 32 | |
| ] | |
| } | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_interleave": true, | |
| "rope_parameters": { | |
| "beta_fast": 32.0, | |
| "beta_slow": 1.0, | |
| "factor": 128.0, | |
| "llama_4_scaling_beta": 0.1, | |
| "max_position_embeddings": 1048576, | |
| "mscale": 1.0, | |
| "mscale_all_dim": 1.0, | |
| "original_max_position_embeddings": 8192, | |
| "partial_rotary_factor": 0.5, | |
| "rope_theta": 10000.0, | |
| "rope_type": "yarn", | |
| "type": "yarn" | |
| }, | |
| "routed_scaling_factor": 1.0, | |
| "tie_word_embeddings": false, | |
| "topk_group": 1, | |
| "transformers_version": "5.23.0.dev0", | |
| "use_cache": true, | |
| "v_head_dim": 32, | |
| "vocab_size": 128 | |
| } | |