Skip to content

Commit dbf40fa

Browse files
authored
Refactor LLaMATests to use block syntax for config
1 parent b95c60a commit dbf40fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ @implementation LLaMATests
9898
return;
9999
}
100100
ExecuTorchLLMGenerationConfig *config =
101-
[[ExecuTorchLLMGenerationConfig alloc] initWithConfigurationHandler:^(ExecuTorchLLMGenerationConfig *config) {
101+
[[ExecuTorchLLMGenerationConfig alloc] initWithBlock:^(ExecuTorchLLMGenerationConfig *config) {
102102
config.sequenceLength = 50;
103103
}];
104104
TokensPerSecondMetric *tokensPerSecondMetric = [TokensPerSecondMetric new];
@@ -107,10 +107,10 @@ @implementation LLaMATests
107107
tokensPerSecondMetric.tokenCount = 0;
108108
BOOL status = [runner generateWithPrompt:@"Once upon a time"
109109
config:config
110-
withTokenCallback:^(NSString *token) {
110+
tokenCallback:^(NSString *token) {
111111
tokensPerSecondMetric.tokenCount++;
112112
}
113-
error:NULL];
113+
error:NULL];
114114
XCTAssertTrue(status);
115115
}];
116116
},

0 commit comments

Comments
 (0)