Skip to content

Commit b8ed35d

Browse files
Qualcomm AI Engine Direct - fix miss layernorm registry (#15824)
### Summary - fix miss layernorm registry for gemma. ### Test Plan ```bash python examples/qualcomm/oss_scripts/llama/llama.py -b build-android -s ${SERIAL_NUM} -m ${SOC_MODEL} --temperature 0 --model_mode hybrid --max_seq_len 1024 --prefill_ar_len 128 --decoder_model gemma-2b --prompt "I would like to learn python, could you teach me with a simple example?" --tasks wikitext --limit 1 ```
1 parent 623d5a5 commit b8ed35d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/qualcomm/oss_scripts/llama/model/layernorm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(self, hidden_size: int, eps=1e-5):
4242
super().__init__(hidden_size, eps=eps)
4343

4444

45+
@register_norm("gemma3")
4546
@register_norm("rmsnorm")
4647
class RMSNorm(torch.nn.RMSNorm, Norm):
4748
def __init__(self, hidden_size: int, eps=1e-5):

0 commit comments

Comments
 (0)