badaoui HF Staff commited on
Commit
46d5a4f
·
verified ·
1 Parent(s): ec9e6f9

Add Neuron-optimized files for Qwen/Qwen2.5-0.5B

Browse files

🤖 Neuron Export Bot: Adding AWS Neuron-optimized model files.

Original model: [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B)
Task: text-generation
Generated by: [badaoui](https://huggingface.co/badaoui)
Generated using: [Optimum Neuron Compiler Space](https://huggingface.co/spaces/optimum/neuron-export)

These files have been pre-compiled for AWS Neuron devices (Inferentia/Trainium) and should provide improved inference performance.

Files changed (4) hide show
  1. README.md +38 -0
  2. config.json +56 -0
  3. model.pt +3 -0
  4. neuron_config.json +27 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - neuron
4
+ - optimized
5
+ - aws-neuron
6
+ - text-generation
7
+ base_model: Qwen/Qwen2.5-0.5B
8
+ ---
9
+
10
+ # Neuron-Optimized Qwen/Qwen2.5-0.5B
11
+
12
+ This repository contains AWS Neuron-optimized files for [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B)
17
+ - **Task**: text-generation
18
+ - **Optimization**: AWS Neuron compilation
19
+ - **Generated by**: [badaoui](https://huggingface.co/badaoui)
20
+ - **Generated using**: [Optimum Neuron Compiler Space](https://huggingface.co/spaces/optimum/neuron-export)
21
+
22
+ ## Usage
23
+
24
+ This model has been optimized for AWS Neuron devices (Inferentia/Trainium). To use it:
25
+
26
+ ```python
27
+ from optimum.neuron import NeuronModelForCausalLM
28
+
29
+ model = NeuronModelForCausalLM.from_pretrained("badaoui/Qwen-Qwen2.5-0.5B-neuron")
30
+ ```
31
+
32
+ ## Performance
33
+
34
+ These files are pre-compiled for AWS Neuron devices and should provide improved inference performance compared to the original model when deployed on Inferentia or Trainium instances.
35
+
36
+ ## Original Model
37
+
38
+ For the original model, training details, and more information, please visit: [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B)
config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "eos_token_id": 151643,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 896,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 4864,
12
+ "layer_types": [
13
+ "full_attention",
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention"
37
+ ],
38
+ "max_position_embeddings": 32768,
39
+ "max_window_layers": 24,
40
+ "model_type": "qwen2",
41
+ "num_attention_heads": 14,
42
+ "num_hidden_layers": 24,
43
+ "num_key_value_heads": 2,
44
+ "pad_token_id": 0,
45
+ "rms_norm_eps": 1e-06,
46
+ "rope_scaling": null,
47
+ "rope_theta": 1000000.0,
48
+ "sliding_window": null,
49
+ "tie_word_embeddings": true,
50
+ "torch_dtype": "bfloat16",
51
+ "transformers_version": "4.55.4",
52
+ "use_cache": true,
53
+ "use_mrope": false,
54
+ "use_sliding_window": false,
55
+ "vocab_size": 151936
56
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:487556227641bd714fd53ffee225046b1d5aa399802ec8255a198260870af261
3
+ size 3770117
neuron_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_serialized_key": "NxDNeuronConfig",
3
+ "batch_size": 1,
4
+ "capacity_factor": null,
5
+ "checkpoint_id": "Qwen/Qwen2.5-0.5B",
6
+ "checkpoint_revision": "060db6499f32faf8b98477b0a26969ef7d8b9987",
7
+ "continuous_batching": false,
8
+ "ep_degree": 1,
9
+ "fused_qkv": false,
10
+ "glu_mlp": true,
11
+ "local_ranks_size": 4,
12
+ "max_batch_size": 1,
13
+ "max_context_length": 128,
14
+ "max_topk": 256,
15
+ "n_active_tokens": 128,
16
+ "neuronxcc_version": "2.21.18209.0+043b1bf7",
17
+ "on_device_sampling": true,
18
+ "optimum_neuron_version": "0.4.1",
19
+ "output_logits": false,
20
+ "pp_degree": 1,
21
+ "sequence_length": 128,
22
+ "speculation_length": 0,
23
+ "start_rank_id": 0,
24
+ "target": "inf2",
25
+ "torch_dtype": "bfloat16",
26
+ "tp_degree": 4
27
+ }