Upload folder using huggingface_hub
Browse files- README.md +26 -0
- assets/tokenizer/merges.txt +0 -0
- assets/tokenizer/vocabulary.json +0 -0
- config.json +23 -0
- metadata.json +6 -0
- model.weights.h5 +3 -0
- preprocessor.json +51 -0
- task.json +82 -0
- tokenizer.json +30 -0
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
---
|
| 5 |
+
This is a [`Llama3` model](https://keras.io/api/keras_hub/models/llama3) uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
|
| 6 |
+
This model is related to a `CausalLM` task.
|
| 7 |
+
|
| 8 |
+
Model config:
|
| 9 |
+
* **name:** llama3_backbone
|
| 10 |
+
* **trainable:** True
|
| 11 |
+
* **vocabulary_size:** 128256
|
| 12 |
+
* **num_layers:** 16
|
| 13 |
+
* **num_query_heads:** 32
|
| 14 |
+
* **hidden_dim:** 2048
|
| 15 |
+
* **intermediate_dim:** 8192
|
| 16 |
+
* **rope_max_wavelength:** 500000.0
|
| 17 |
+
* **rope_position_scaling_factor:** 1
|
| 18 |
+
* **rope_frequency_adjustment_factor:** 32
|
| 19 |
+
* **rope_low_freq_factor:** 1
|
| 20 |
+
* **rope_high_freq_factor:** 4
|
| 21 |
+
* **rope_pretraining_sequence_length:** 8192
|
| 22 |
+
* **num_key_value_heads:** 8
|
| 23 |
+
* **layer_norm_epsilon:** 1e-05
|
| 24 |
+
* **dropout:** 0
|
| 25 |
+
|
| 26 |
+
This model card has been generated automatically and should be completed by the model author. See [Model Cards documentation](https://huggingface.co/docs/hub/model-cards) for more information.
|
assets/tokenizer/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/tokenizer/vocabulary.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.llama3.llama3_backbone",
|
| 3 |
+
"class_name": "Llama3Backbone",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "llama3_backbone",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"vocabulary_size": 128256,
|
| 8 |
+
"num_layers": 16,
|
| 9 |
+
"num_query_heads": 32,
|
| 10 |
+
"hidden_dim": 2048,
|
| 11 |
+
"intermediate_dim": 8192,
|
| 12 |
+
"rope_max_wavelength": 500000.0,
|
| 13 |
+
"rope_position_scaling_factor": 1,
|
| 14 |
+
"rope_frequency_adjustment_factor": 32,
|
| 15 |
+
"rope_low_freq_factor": 1,
|
| 16 |
+
"rope_high_freq_factor": 4,
|
| 17 |
+
"rope_pretraining_sequence_length": 8192,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"layer_norm_epsilon": 1e-05,
|
| 20 |
+
"dropout": 0
|
| 21 |
+
},
|
| 22 |
+
"registered_name": "keras_hub>Llama3Backbone"
|
| 23 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"keras_version": "3.8.0",
|
| 3 |
+
"keras_hub_version": "0.18.1",
|
| 4 |
+
"parameter_count": 1498482688,
|
| 5 |
+
"date_saved": "2025-04-12@04:02:49"
|
| 6 |
+
}
|
model.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36cd1e64c1bccd85b2ab39676571657e4918bb1f5fa933cff8a1a95f2da264d9
|
| 3 |
+
size 2997527440
|
preprocessor.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.llama3.llama3_causal_lm_preprocessor",
|
| 3 |
+
"class_name": "Llama3CausalLMPreprocessor",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "llama3_causal_lm_preprocessor",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "float32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"tokenizer": {
|
| 16 |
+
"module": "keras_hub.src.models.llama3.llama3_tokenizer",
|
| 17 |
+
"class_name": "Llama3Tokenizer",
|
| 18 |
+
"config": {
|
| 19 |
+
"name": "llama3_tokenizer_1",
|
| 20 |
+
"trainable": true,
|
| 21 |
+
"dtype": {
|
| 22 |
+
"module": "keras",
|
| 23 |
+
"class_name": "DTypePolicy",
|
| 24 |
+
"config": {
|
| 25 |
+
"name": "int32"
|
| 26 |
+
},
|
| 27 |
+
"registered_name": null
|
| 28 |
+
},
|
| 29 |
+
"config_file": "tokenizer.json",
|
| 30 |
+
"sequence_length": null,
|
| 31 |
+
"add_prefix_space": false,
|
| 32 |
+
"unsplittable_tokens": [
|
| 33 |
+
"<|begin_of_text|>",
|
| 34 |
+
"<|finetune_right_pad_id|>",
|
| 35 |
+
"<|start_header_id|>",
|
| 36 |
+
"<|end_of_text|>",
|
| 37 |
+
"<|python_tag|>",
|
| 38 |
+
"<|eot_id|>",
|
| 39 |
+
"<|eom_id|>",
|
| 40 |
+
"<|end_header_id|>"
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
"registered_name": "keras_hub>Llama3Tokenizer"
|
| 44 |
+
},
|
| 45 |
+
"config_file": "preprocessor.json",
|
| 46 |
+
"sequence_length": 1024,
|
| 47 |
+
"add_start_token": true,
|
| 48 |
+
"add_end_token": true
|
| 49 |
+
},
|
| 50 |
+
"registered_name": "keras_hub>Llama3CausalLMPreprocessor"
|
| 51 |
+
}
|
task.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.llama3.llama3_causal_lm",
|
| 3 |
+
"class_name": "Llama3CausalLM",
|
| 4 |
+
"config": {
|
| 5 |
+
"backbone": {
|
| 6 |
+
"module": "keras_hub.src.models.llama3.llama3_backbone",
|
| 7 |
+
"class_name": "Llama3Backbone",
|
| 8 |
+
"config": {
|
| 9 |
+
"name": "llama3_backbone",
|
| 10 |
+
"trainable": true,
|
| 11 |
+
"vocabulary_size": 128256,
|
| 12 |
+
"num_layers": 16,
|
| 13 |
+
"num_query_heads": 32,
|
| 14 |
+
"hidden_dim": 2048,
|
| 15 |
+
"intermediate_dim": 8192,
|
| 16 |
+
"rope_max_wavelength": 500000.0,
|
| 17 |
+
"rope_position_scaling_factor": 1,
|
| 18 |
+
"rope_frequency_adjustment_factor": 32,
|
| 19 |
+
"rope_low_freq_factor": 1,
|
| 20 |
+
"rope_high_freq_factor": 4,
|
| 21 |
+
"rope_pretraining_sequence_length": 8192,
|
| 22 |
+
"num_key_value_heads": 8,
|
| 23 |
+
"layer_norm_epsilon": 1e-05,
|
| 24 |
+
"dropout": 0
|
| 25 |
+
},
|
| 26 |
+
"registered_name": "keras_hub>Llama3Backbone"
|
| 27 |
+
},
|
| 28 |
+
"preprocessor": {
|
| 29 |
+
"module": "keras_hub.src.models.llama3.llama3_causal_lm_preprocessor",
|
| 30 |
+
"class_name": "Llama3CausalLMPreprocessor",
|
| 31 |
+
"config": {
|
| 32 |
+
"name": "llama3_causal_lm_preprocessor",
|
| 33 |
+
"trainable": true,
|
| 34 |
+
"dtype": {
|
| 35 |
+
"module": "keras",
|
| 36 |
+
"class_name": "DTypePolicy",
|
| 37 |
+
"config": {
|
| 38 |
+
"name": "float32"
|
| 39 |
+
},
|
| 40 |
+
"registered_name": null
|
| 41 |
+
},
|
| 42 |
+
"tokenizer": {
|
| 43 |
+
"module": "keras_hub.src.models.llama3.llama3_tokenizer",
|
| 44 |
+
"class_name": "Llama3Tokenizer",
|
| 45 |
+
"config": {
|
| 46 |
+
"name": "llama3_tokenizer_1",
|
| 47 |
+
"trainable": true,
|
| 48 |
+
"dtype": {
|
| 49 |
+
"module": "keras",
|
| 50 |
+
"class_name": "DTypePolicy",
|
| 51 |
+
"config": {
|
| 52 |
+
"name": "int32"
|
| 53 |
+
},
|
| 54 |
+
"registered_name": null
|
| 55 |
+
},
|
| 56 |
+
"config_file": "tokenizer.json",
|
| 57 |
+
"sequence_length": null,
|
| 58 |
+
"add_prefix_space": false,
|
| 59 |
+
"unsplittable_tokens": [
|
| 60 |
+
"<|finetune_right_pad_id|>",
|
| 61 |
+
"<|end_header_id|>",
|
| 62 |
+
"<|end_of_text|>",
|
| 63 |
+
"<|begin_of_text|>",
|
| 64 |
+
"<|eom_id|>",
|
| 65 |
+
"<|start_header_id|>",
|
| 66 |
+
"<|eot_id|>",
|
| 67 |
+
"<|python_tag|>"
|
| 68 |
+
]
|
| 69 |
+
},
|
| 70 |
+
"registered_name": "keras_hub>Llama3Tokenizer"
|
| 71 |
+
},
|
| 72 |
+
"config_file": "preprocessor.json",
|
| 73 |
+
"sequence_length": 1024,
|
| 74 |
+
"add_start_token": true,
|
| 75 |
+
"add_end_token": true
|
| 76 |
+
},
|
| 77 |
+
"registered_name": "keras_hub>Llama3CausalLMPreprocessor"
|
| 78 |
+
},
|
| 79 |
+
"name": "llama3_causal_lm"
|
| 80 |
+
},
|
| 81 |
+
"registered_name": "keras_hub>Llama3CausalLM"
|
| 82 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.llama3.llama3_tokenizer",
|
| 3 |
+
"class_name": "Llama3Tokenizer",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "llama3_tokenizer_1",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "int32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"config_file": "tokenizer.json",
|
| 16 |
+
"sequence_length": null,
|
| 17 |
+
"add_prefix_space": false,
|
| 18 |
+
"unsplittable_tokens": [
|
| 19 |
+
"<|begin_of_text|>",
|
| 20 |
+
"<|finetune_right_pad_id|>",
|
| 21 |
+
"<|start_header_id|>",
|
| 22 |
+
"<|end_of_text|>",
|
| 23 |
+
"<|python_tag|>",
|
| 24 |
+
"<|eot_id|>",
|
| 25 |
+
"<|eom_id|>",
|
| 26 |
+
"<|end_header_id|>"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"registered_name": "keras_hub>Llama3Tokenizer"
|
| 30 |
+
}
|