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:** 24
|
13 |
+
* **num_query_heads:** 14
|
14 |
+
* **hidden_dim:** 896
|
15 |
+
* **intermediate_dim:** 4864
|
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": 24,
|
9 |
+
"num_query_heads": 14,
|
10 |
+
"hidden_dim": 896,
|
11 |
+
"intermediate_dim": 4864,
|
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": 494032768,
|
5 |
+
"date_saved": "2025-03-28@13:19:24",
|
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:c5e447c110ce501614b68694977e658129662d5f2db04a5b8d7f08f7c81ba92e
|
3 |
+
size 1976979928
|
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 |
+
"<|object_ref_start|>",
|
34 |
+
"<|endoftext|>",
|
35 |
+
"<|im_start|>",
|
36 |
+
"<|im_end|>",
|
37 |
+
"<|fim_middle|>",
|
38 |
+
"<|vision_start|>",
|
39 |
+
"</tool_call>",
|
40 |
+
"<|vision_pad|>",
|
41 |
+
"<|fim_prefix|>",
|
42 |
+
"<|box_start|>",
|
43 |
+
"<|object_ref_end|>",
|
44 |
+
"<|box_end|>",
|
45 |
+
"<|fim_suffix|>",
|
46 |
+
"<|quad_end|>",
|
47 |
+
"<|vision_end|>",
|
48 |
+
"<|video_pad|>",
|
49 |
+
"<tool_call>",
|
50 |
+
"<|file_sep|>",
|
51 |
+
"<|repo_name|>",
|
52 |
+
"<|image_pad|>",
|
53 |
+
"<|fim_pad|>",
|
54 |
+
"<|quad_start|>"
|
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": 24,
|
13 |
+
"num_query_heads": 14,
|
14 |
+
"hidden_dim": 896,
|
15 |
+
"intermediate_dim": 4864,
|
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 |
+
"<|object_ref_start|>",
|
62 |
+
"<|endoftext|>",
|
63 |
+
"<|im_start|>",
|
64 |
+
"<|im_end|>",
|
65 |
+
"<|fim_middle|>",
|
66 |
+
"<|vision_start|>",
|
67 |
+
"</tool_call>",
|
68 |
+
"<|vision_pad|>",
|
69 |
+
"<|fim_prefix|>",
|
70 |
+
"<|box_start|>",
|
71 |
+
"<|object_ref_end|>",
|
72 |
+
"<|box_end|>",
|
73 |
+
"<|fim_suffix|>",
|
74 |
+
"<|quad_end|>",
|
75 |
+
"<|vision_end|>",
|
76 |
+
"<|video_pad|>",
|
77 |
+
"<tool_call>",
|
78 |
+
"<|file_sep|>",
|
79 |
+
"<|repo_name|>",
|
80 |
+
"<|image_pad|>",
|
81 |
+
"<|fim_pad|>",
|
82 |
+
"<|quad_start|>"
|
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 |
+
"<|object_ref_start|>",
|
20 |
+
"<|endoftext|>",
|
21 |
+
"<|im_start|>",
|
22 |
+
"<|im_end|>",
|
23 |
+
"<|fim_middle|>",
|
24 |
+
"<|vision_start|>",
|
25 |
+
"</tool_call>",
|
26 |
+
"<|vision_pad|>",
|
27 |
+
"<|fim_prefix|>",
|
28 |
+
"<|box_start|>",
|
29 |
+
"<|object_ref_end|>",
|
30 |
+
"<|box_end|>",
|
31 |
+
"<|fim_suffix|>",
|
32 |
+
"<|quad_end|>",
|
33 |
+
"<|vision_end|>",
|
34 |
+
"<|video_pad|>",
|
35 |
+
"<tool_call>",
|
36 |
+
"<|file_sep|>",
|
37 |
+
"<|repo_name|>",
|
38 |
+
"<|image_pad|>",
|
39 |
+
"<|fim_pad|>",
|
40 |
+
"<|quad_start|>"
|
41 |
+
]
|
42 |
+
},
|
43 |
+
"registered_name": "keras_hub>QwenTokenizer"
|
44 |
+
}
|