badaoui HF Staff commited on
Commit
8473e3b
·
verified ·
1 Parent(s): d460a0f

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

Browse files

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

Original model: [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
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 +59 -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-1.5B-Instruct
8
+ ---
9
+
10
+ # Neuron-Optimized Qwen/Qwen2.5-1.5B-Instruct
11
+
12
+ This repository contains AWS Neuron-optimized files for [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct).
13
+
14
+ ## Model Details
15
+
16
+ - **Base Model**: [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
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-1.5B-Instruct-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-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "eos_token_id": 151645,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 1536,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 8960,
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
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention"
41
+ ],
42
+ "max_position_embeddings": 32768,
43
+ "max_window_layers": 21,
44
+ "model_type": "qwen2",
45
+ "num_attention_heads": 12,
46
+ "num_hidden_layers": 28,
47
+ "num_key_value_heads": 2,
48
+ "pad_token_id": 0,
49
+ "rms_norm_eps": 1e-06,
50
+ "rope_scaling": null,
51
+ "rope_theta": 1000000.0,
52
+ "sliding_window": null,
53
+ "tie_word_embeddings": true,
54
+ "torch_dtype": "bfloat16",
55
+ "transformers_version": "4.55.4",
56
+ "use_cache": true,
57
+ "use_sliding_window": false,
58
+ "vocab_size": 151936
59
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23c459c023f4f2a03ebc9abb3b815bd13f21ce989a6b9fa01dde892fa6a3ebcb
3
+ size 5840901
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-1.5B-Instruct",
6
+ "checkpoint_revision": "989aa7980e4cf806f80c7fef2b1adb7bc71aa306",
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
+ }