Upload folder using huggingface_hub
Browse files- README.md +25 -0
- assets/tokenizer/merges.txt +0 -0
- assets/tokenizer/vocabulary.json +0 -0
- config.json +24 -0
- metadata.json +9 -0
- model.weights.h5 +3 -0
- preprocessor.json +65 -0
- task.json +97 -0
- tokenizer.json +44 -0
README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
---
|
| 5 |
+
This is a [`Qwen` model](https://keras.io/api/keras_hub/models/qwen) 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:** qwen_backbone
|
| 10 |
+
* **trainable:** True
|
| 11 |
+
* **vocabulary_size:** 151936
|
| 12 |
+
* **num_layers:** 36
|
| 13 |
+
* **num_query_heads:** 16
|
| 14 |
+
* **hidden_dim:** 2048
|
| 15 |
+
* **intermediate_dim:** 11008
|
| 16 |
+
* **rope_max_wavelength:** 1000000.0
|
| 17 |
+
* **rope_scaling_factor:** 1.0
|
| 18 |
+
* **num_key_value_heads:** 2
|
| 19 |
+
* **layer_norm_epsilon:** 1e-06
|
| 20 |
+
* **dropout:** 0
|
| 21 |
+
* **tie_word_embeddings:** True
|
| 22 |
+
* **use_sliding_window_attention:** [False]
|
| 23 |
+
* **sliding_window_size:** 32768
|
| 24 |
+
|
| 25 |
+
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,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.qwen.qwen_backbone",
|
| 3 |
+
"class_name": "QwenBackbone",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "qwen_backbone",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"vocabulary_size": 151936,
|
| 8 |
+
"num_layers": 36,
|
| 9 |
+
"num_query_heads": 16,
|
| 10 |
+
"hidden_dim": 2048,
|
| 11 |
+
"intermediate_dim": 11008,
|
| 12 |
+
"rope_max_wavelength": 1000000.0,
|
| 13 |
+
"rope_scaling_factor": 1.0,
|
| 14 |
+
"num_key_value_heads": 2,
|
| 15 |
+
"layer_norm_epsilon": 1e-06,
|
| 16 |
+
"dropout": 0,
|
| 17 |
+
"tie_word_embeddings": true,
|
| 18 |
+
"use_sliding_window_attention": [
|
| 19 |
+
false
|
| 20 |
+
],
|
| 21 |
+
"sliding_window_size": 32768
|
| 22 |
+
},
|
| 23 |
+
"registered_name": "keras_hub>QwenBackbone"
|
| 24 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"keras_version": "3.8.0",
|
| 3 |
+
"keras_hub_version": "0.20.0.dev202503250356",
|
| 4 |
+
"parameter_count": 3085938688,
|
| 5 |
+
"date_saved": "2025-03-28@12:59:33",
|
| 6 |
+
"tasks": [
|
| 7 |
+
"CausalLM"
|
| 8 |
+
]
|
| 9 |
+
}
|
model.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:783ac97507ea215b3d846803d6605911c292613f9d83d55cffcc55a54fe9b142
|
| 3 |
+
size 12345018464
|
preprocessor.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.qwen.qwen_causal_lm_preprocessor",
|
| 3 |
+
"class_name": "QwenCausalLMPreprocessor",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "qwen_causal_lm_preprocessor_2",
|
| 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.qwen.qwen_tokenizer",
|
| 17 |
+
"class_name": "QwenTokenizer",
|
| 18 |
+
"config": {
|
| 19 |
+
"name": "qwen_tokenizer",
|
| 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 |
+
"<|im_start|>",
|
| 34 |
+
"<|im_end|>",
|
| 35 |
+
"<|object_ref_end|>",
|
| 36 |
+
"<|endoftext|>",
|
| 37 |
+
"<tool_call>",
|
| 38 |
+
"<|fim_middle|>",
|
| 39 |
+
"<|video_pad|>",
|
| 40 |
+
"<|box_end|>",
|
| 41 |
+
"<|fim_suffix|>",
|
| 42 |
+
"<|repo_name|>",
|
| 43 |
+
"<|object_ref_start|>",
|
| 44 |
+
"<|image_pad|>",
|
| 45 |
+
"<|box_start|>",
|
| 46 |
+
"<|quad_end|>",
|
| 47 |
+
"<|quad_start|>",
|
| 48 |
+
"<|vision_end|>",
|
| 49 |
+
"<|fim_prefix|>",
|
| 50 |
+
"</tool_call>",
|
| 51 |
+
"<|vision_pad|>",
|
| 52 |
+
"<|vision_start|>",
|
| 53 |
+
"<|fim_pad|>",
|
| 54 |
+
"<|file_sep|>"
|
| 55 |
+
]
|
| 56 |
+
},
|
| 57 |
+
"registered_name": "keras_hub>QwenTokenizer"
|
| 58 |
+
},
|
| 59 |
+
"config_file": "preprocessor.json",
|
| 60 |
+
"sequence_length": 1024,
|
| 61 |
+
"add_start_token": true,
|
| 62 |
+
"add_end_token": true
|
| 63 |
+
},
|
| 64 |
+
"registered_name": "keras_hub>QwenCausalLMPreprocessor"
|
| 65 |
+
}
|
task.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.qwen.qwen_causal_lm",
|
| 3 |
+
"class_name": "QwenCausalLM",
|
| 4 |
+
"config": {
|
| 5 |
+
"backbone": {
|
| 6 |
+
"module": "keras_hub.src.models.qwen.qwen_backbone",
|
| 7 |
+
"class_name": "QwenBackbone",
|
| 8 |
+
"config": {
|
| 9 |
+
"name": "qwen_backbone",
|
| 10 |
+
"trainable": true,
|
| 11 |
+
"vocabulary_size": 151936,
|
| 12 |
+
"num_layers": 36,
|
| 13 |
+
"num_query_heads": 16,
|
| 14 |
+
"hidden_dim": 2048,
|
| 15 |
+
"intermediate_dim": 11008,
|
| 16 |
+
"rope_max_wavelength": 1000000.0,
|
| 17 |
+
"rope_scaling_factor": 1.0,
|
| 18 |
+
"num_key_value_heads": 2,
|
| 19 |
+
"layer_norm_epsilon": 1e-06,
|
| 20 |
+
"dropout": 0,
|
| 21 |
+
"tie_word_embeddings": true,
|
| 22 |
+
"use_sliding_window_attention": [
|
| 23 |
+
false
|
| 24 |
+
],
|
| 25 |
+
"sliding_window_size": 32768
|
| 26 |
+
},
|
| 27 |
+
"registered_name": "keras_hub>QwenBackbone"
|
| 28 |
+
},
|
| 29 |
+
"preprocessor": {
|
| 30 |
+
"module": "keras_hub.src.models.qwen.qwen_causal_lm_preprocessor",
|
| 31 |
+
"class_name": "QwenCausalLMPreprocessor",
|
| 32 |
+
"config": {
|
| 33 |
+
"name": "qwen_causal_lm_preprocessor_2",
|
| 34 |
+
"trainable": true,
|
| 35 |
+
"dtype": {
|
| 36 |
+
"module": "keras",
|
| 37 |
+
"class_name": "DTypePolicy",
|
| 38 |
+
"config": {
|
| 39 |
+
"name": "float32"
|
| 40 |
+
},
|
| 41 |
+
"registered_name": null
|
| 42 |
+
},
|
| 43 |
+
"tokenizer": {
|
| 44 |
+
"module": "keras_hub.src.models.qwen.qwen_tokenizer",
|
| 45 |
+
"class_name": "QwenTokenizer",
|
| 46 |
+
"config": {
|
| 47 |
+
"name": "qwen_tokenizer",
|
| 48 |
+
"trainable": true,
|
| 49 |
+
"dtype": {
|
| 50 |
+
"module": "keras",
|
| 51 |
+
"class_name": "DTypePolicy",
|
| 52 |
+
"config": {
|
| 53 |
+
"name": "int32"
|
| 54 |
+
},
|
| 55 |
+
"registered_name": null
|
| 56 |
+
},
|
| 57 |
+
"config_file": "tokenizer.json",
|
| 58 |
+
"sequence_length": null,
|
| 59 |
+
"add_prefix_space": false,
|
| 60 |
+
"unsplittable_tokens": [
|
| 61 |
+
"<|im_start|>",
|
| 62 |
+
"<|im_end|>",
|
| 63 |
+
"<|object_ref_end|>",
|
| 64 |
+
"<|endoftext|>",
|
| 65 |
+
"<tool_call>",
|
| 66 |
+
"<|fim_middle|>",
|
| 67 |
+
"<|video_pad|>",
|
| 68 |
+
"<|box_end|>",
|
| 69 |
+
"<|fim_suffix|>",
|
| 70 |
+
"<|repo_name|>",
|
| 71 |
+
"<|object_ref_start|>",
|
| 72 |
+
"<|image_pad|>",
|
| 73 |
+
"<|box_start|>",
|
| 74 |
+
"<|quad_end|>",
|
| 75 |
+
"<|quad_start|>",
|
| 76 |
+
"<|vision_end|>",
|
| 77 |
+
"<|fim_prefix|>",
|
| 78 |
+
"</tool_call>",
|
| 79 |
+
"<|vision_pad|>",
|
| 80 |
+
"<|vision_start|>",
|
| 81 |
+
"<|fim_pad|>",
|
| 82 |
+
"<|file_sep|>"
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
+
"registered_name": "keras_hub>QwenTokenizer"
|
| 86 |
+
},
|
| 87 |
+
"config_file": "preprocessor.json",
|
| 88 |
+
"sequence_length": 1024,
|
| 89 |
+
"add_start_token": true,
|
| 90 |
+
"add_end_token": true
|
| 91 |
+
},
|
| 92 |
+
"registered_name": "keras_hub>QwenCausalLMPreprocessor"
|
| 93 |
+
},
|
| 94 |
+
"name": "qwen_causal_lm"
|
| 95 |
+
},
|
| 96 |
+
"registered_name": "keras_hub>QwenCausalLM"
|
| 97 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.qwen.qwen_tokenizer",
|
| 3 |
+
"class_name": "QwenTokenizer",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "qwen_tokenizer",
|
| 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 |
+
"<|im_start|>",
|
| 20 |
+
"<|im_end|>",
|
| 21 |
+
"<|object_ref_end|>",
|
| 22 |
+
"<|endoftext|>",
|
| 23 |
+
"<tool_call>",
|
| 24 |
+
"<|fim_middle|>",
|
| 25 |
+
"<|video_pad|>",
|
| 26 |
+
"<|box_end|>",
|
| 27 |
+
"<|fim_suffix|>",
|
| 28 |
+
"<|repo_name|>",
|
| 29 |
+
"<|object_ref_start|>",
|
| 30 |
+
"<|image_pad|>",
|
| 31 |
+
"<|box_start|>",
|
| 32 |
+
"<|quad_end|>",
|
| 33 |
+
"<|quad_start|>",
|
| 34 |
+
"<|vision_end|>",
|
| 35 |
+
"<|fim_prefix|>",
|
| 36 |
+
"</tool_call>",
|
| 37 |
+
"<|vision_pad|>",
|
| 38 |
+
"<|vision_start|>",
|
| 39 |
+
"<|fim_pad|>",
|
| 40 |
+
"<|file_sep|>"
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
"registered_name": "keras_hub>QwenTokenizer"
|
| 44 |
+
}
|