Skip to content

Commit ea97807

Browse files
committed
fix code format
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
1 parent d0a5195 commit ea97807

2 files changed

Lines changed: 4 additions & 17 deletions

File tree

python/src/coreai_models/llm/export.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,7 @@ def _resolve_export_config(args: argparse.Namespace) -> ExportConfig:
325325

326326
if args.disable_embedding_quantization_ios and variant != "iOS":
327327
raise SystemExit(
328-
"--disable-embedding-quantization-ios requires --platform iOS "
329-
f"(got '{variant}')."
328+
f"--disable-embedding-quantization-ios requires --platform iOS (got '{variant}')."
330329
)
331330

332331
if args.compression_config is not None:
@@ -430,9 +429,7 @@ def main() -> None:
430429
print(f" num_layers: {config.num_layers}")
431430
print(f" overwrite: {config.overwrite}")
432431
if config.variant == "iOS":
433-
print(
434-
f" disable_embedding_quantization: {config.disable_embedding_quantization}"
435-
)
432+
print(f" disable_embedding_quantization: {config.disable_embedding_quantization}")
436433
return
437434

438435
result = export_model(config)

python/src/coreai_models/primitives/ios/sdpa.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,8 @@ def forward(
7878
)
7979

8080
q = query.reshape(B, n_heads, self.head_dim, S).transpose(2, 3).contiguous()
81-
k = (
82-
key[..., :S]
83-
.reshape(B, n_kv_heads, self.head_dim, S)
84-
.transpose(2, 3)
85-
.contiguous()
86-
)
87-
v = (
88-
value[..., :S]
89-
.reshape(B, n_kv_heads, self.head_dim, S)
90-
.transpose(2, 3)
91-
.contiguous()
92-
)
81+
k = key[..., :S].reshape(B, n_kv_heads, self.head_dim, S).transpose(2, 3).contiguous()
82+
v = value[..., :S].reshape(B, n_kv_heads, self.head_dim, S).transpose(2, 3).contiguous()
9383

9484
out = F.scaled_dot_product_attention(
9585
q,

0 commit comments

Comments
 (0)