Skip to content

Commit cda4025

Browse files
authored
Update LanguageModel.swift (#276)
1 parent 7422a76 commit cda4025

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Models/LanguageModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public class LanguageModelWithStatefulKVCache: LanguageModel {
472472
Keys.inputIds: inputIds
473473
]
474474
if isRequiringAttentionMask {
475-
#if !((os(macOS) || (macCatalyst)) && arch(x86_64))
475+
#if !((os(macOS) || targetEnvironment(macCatalyst)) && arch(x86_64))
476476
// TODO: Infer scalar type from cache or model I/O descriptors
477477
let attentionMask = MLTensor(zeros: [1, 1, 1, tokenCount + 1], scalarType: Float16.self)
478478
inputDictionary[Keys.attentionMask] = attentionMask

0 commit comments

Comments
 (0)