Instructions to use NeoRoth/gemma-4-e4b-it-assistant-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use NeoRoth/gemma-4-e4b-it-assistant-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir gemma-4-e4b-it-assistant-mlx NeoRoth/gemma-4-e4b-it-assistant-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- config.json +88 -0
- generation_config.json +17 -0
- model.safetensors +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +30 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Gemma4AssistantForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"audio_token_id": 258881,
|
| 6 |
+
"backbone_hidden_size": 2560,
|
| 7 |
+
"boa_token_id": 256000,
|
| 8 |
+
"boi_token_id": 255999,
|
| 9 |
+
"centroid_intermediate_top_k": 32,
|
| 10 |
+
"dtype": "bfloat16",
|
| 11 |
+
"eoa_token_id": 258883,
|
| 12 |
+
"eoi_token_id": 258882,
|
| 13 |
+
"image_token_id": 258880,
|
| 14 |
+
"model_type": "gemma4_assistant",
|
| 15 |
+
"num_centroids": 2048,
|
| 16 |
+
"text_config": {
|
| 17 |
+
"_name_or_path": "",
|
| 18 |
+
"architectures": null,
|
| 19 |
+
"attention_bias": false,
|
| 20 |
+
"attention_dropout": 0.0,
|
| 21 |
+
"attention_k_eq_v": false,
|
| 22 |
+
"bos_token_id": 2,
|
| 23 |
+
"chunk_size_feed_forward": 0,
|
| 24 |
+
"dtype": "bfloat16",
|
| 25 |
+
"enable_moe_block": false,
|
| 26 |
+
"eos_token_id": 1,
|
| 27 |
+
"final_logit_softcapping": null,
|
| 28 |
+
"global_head_dim": 512,
|
| 29 |
+
"head_dim": 256,
|
| 30 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 31 |
+
"hidden_size": 256,
|
| 32 |
+
"hidden_size_per_layer_input": 0,
|
| 33 |
+
"id2label": {
|
| 34 |
+
"0": "LABEL_0",
|
| 35 |
+
"1": "LABEL_1"
|
| 36 |
+
},
|
| 37 |
+
"initializer_range": 0.02,
|
| 38 |
+
"intermediate_size": 2048,
|
| 39 |
+
"is_encoder_decoder": false,
|
| 40 |
+
"label2id": {
|
| 41 |
+
"LABEL_0": 0,
|
| 42 |
+
"LABEL_1": 1
|
| 43 |
+
},
|
| 44 |
+
"layer_types": [
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention"
|
| 49 |
+
],
|
| 50 |
+
"max_position_embeddings": 131072,
|
| 51 |
+
"model_type": "gemma4_text",
|
| 52 |
+
"moe_intermediate_size": null,
|
| 53 |
+
"num_attention_heads": 4,
|
| 54 |
+
"num_experts": null,
|
| 55 |
+
"num_global_key_value_heads": null,
|
| 56 |
+
"num_hidden_layers": 4,
|
| 57 |
+
"num_key_value_heads": 2,
|
| 58 |
+
"num_kv_shared_layers": 4,
|
| 59 |
+
"output_attentions": false,
|
| 60 |
+
"output_hidden_states": false,
|
| 61 |
+
"pad_token_id": 0,
|
| 62 |
+
"problem_type": null,
|
| 63 |
+
"return_dict": true,
|
| 64 |
+
"rms_norm_eps": 1e-06,
|
| 65 |
+
"rope_parameters": {
|
| 66 |
+
"full_attention": {
|
| 67 |
+
"partial_rotary_factor": 0.25,
|
| 68 |
+
"rope_theta": 1000000.0,
|
| 69 |
+
"rope_type": "proportional"
|
| 70 |
+
},
|
| 71 |
+
"sliding_attention": {
|
| 72 |
+
"rope_theta": 10000.0,
|
| 73 |
+
"rope_type": "default"
|
| 74 |
+
}
|
| 75 |
+
},
|
| 76 |
+
"sliding_window": 512,
|
| 77 |
+
"tie_word_embeddings": true,
|
| 78 |
+
"top_k_experts": null,
|
| 79 |
+
"use_bidirectional_attention": null,
|
| 80 |
+
"use_cache": true,
|
| 81 |
+
"use_double_wide_mlp": false,
|
| 82 |
+
"vocab_size": 262144,
|
| 83 |
+
"vocab_size_per_layer_input": 0
|
| 84 |
+
},
|
| 85 |
+
"tie_word_embeddings": true,
|
| 86 |
+
"transformers_version": "5.7.0.dev0",
|
| 87 |
+
"use_ordered_embeddings": true
|
| 88 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
1,
|
| 6 |
+
106,
|
| 7 |
+
50
|
| 8 |
+
],
|
| 9 |
+
"is_assistant": true,
|
| 10 |
+
"num_assistant_tokens": 6,
|
| 11 |
+
"num_assistant_tokens_schedule": "constant",
|
| 12 |
+
"pad_token_id": 0,
|
| 13 |
+
"temperature": 1.0,
|
| 14 |
+
"top_k": 64,
|
| 15 |
+
"top_p": 0.95,
|
| 16 |
+
"transformers_version": "5.7.0.dev0"
|
| 17 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12875062fc25c51e8fa9b62abd2de7ad48b7d63f8559d5d604fbd5a3d6bcff16
|
| 3 |
+
size 159138208
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75a6583c1a418e2bbd79c60d95d28e0f5bf549ad3f2990b5bdb5238c6c2bf70c
|
| 3 |
+
size 32169440
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boa_token": "<|audio>",
|
| 5 |
+
"boi_token": "<|image>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eoa_token": "<audio|>",
|
| 8 |
+
"eoc_token": "<channel|>",
|
| 9 |
+
"eoi_token": "<image|>",
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"eot_token": "<turn|>",
|
| 12 |
+
"escape_token": "<|\"|>",
|
| 13 |
+
"etc_token": "<tool_call|>",
|
| 14 |
+
"etd_token": "<tool|>",
|
| 15 |
+
"etr_token": "<tool_response|>",
|
| 16 |
+
"extra_special_tokens": [],
|
| 17 |
+
"image_token": "<|image|>",
|
| 18 |
+
"mask_token": "<mask>",
|
| 19 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 20 |
+
"pad_token": "<pad>",
|
| 21 |
+
"padding_side": "left",
|
| 22 |
+
"soc_token": "<|channel>",
|
| 23 |
+
"sot_token": "<|turn>",
|
| 24 |
+
"stc_token": "<|tool_call>",
|
| 25 |
+
"std_token": "<|tool>",
|
| 26 |
+
"str_token": "<|tool_response>",
|
| 27 |
+
"think_token": "<|think|>",
|
| 28 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 29 |
+
"unk_token": "<unk>"
|
| 30 |
+
}
|