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
File size: 2,148 Bytes
ac53c7a 4ec61d8 ac53c7a 3a23a8f ac53c7a 3a23a8f bc77947 ac53c7a 3a23a8f ac53c7a bc77947 4ec61d8 ac53c7a 3a23a8f ac53c7a 4ec61d8 ac53c7a 4ec61d8 ac53c7a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | {
"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
}
|