Skip to content

Commit f5819c2

Browse files
committed
Update
[ghstack-poisoned]
2 parents cac8c9b + d8dce0f commit f5819c2

40 files changed

Lines changed: 6318 additions & 122 deletions

backends/arm/MODELS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Conformer
66
- Deep AutoEncoder
77
- Deit Tiny
8+
- DeepSeek-R1-Distill-Qwen-1.5B
89
- DeepLab v3 (DL3)
910
- DS CNN
1011
- Inception v3 (IC3)

backends/arm/scripts/docgen/ethos-u/backends-arm-ethos-u-overview.md.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ See [Partitioner API](arm-ethos-u-partitioner.md) for more information of the Pa
4848
## Quantization
4949

5050
Since the Ethos-U backend is integer-only, all operators intended be executed on the NPU needs to be quantized. The Ethos-U quantizer supports
51-
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html) and
52-
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_qat.html) quantization.
51+
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html) and
52+
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_qat.html) quantization.
5353

5454
For more information on quantization, see [Quantization](arm-ethos-u-quantization.md) <!-- @lint-ignore -->
5555

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2026 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
from transformers.models.qwen2.configuration_qwen2 import Qwen2Config
7+
8+
9+
def get_deepseek_r1_distill_qwen_1_5b_checkpoint_config() -> Qwen2Config:
10+
config = Qwen2Config(
11+
architectures=["Qwen2ForCausalLM"],
12+
attention_dropout=0.0,
13+
bos_token_id=151643,
14+
eos_token_id=151643,
15+
hidden_act="silu",
16+
hidden_size=1536,
17+
initializer_range=0.02,
18+
intermediate_size=8960,
19+
max_position_embeddings=131072,
20+
max_window_layers=21,
21+
num_attention_heads=12,
22+
num_hidden_layers=28,
23+
num_key_value_heads=2,
24+
rms_norm_eps=1e-6, # type: ignore[arg-type]
25+
rope_parameters={
26+
"rope_type": "default",
27+
"rope_theta": 10000.0,
28+
},
29+
sliding_window=4096,
30+
tie_word_embeddings=False,
31+
transformers_version="4.44.0",
32+
use_cache=True,
33+
use_sliding_window=False,
34+
vocab_size=151936,
35+
)
36+
config.update(
37+
{
38+
"torch_dtype": "bfloat16",
39+
"use_mrope": False,
40+
}
41+
)
42+
return config

0 commit comments

Comments
 (0)