File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
extension/benchmark/apple/Benchmark/Tests/LLaMA Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -97,18 +97,16 @@ @implementation LLaMATests
9797 XCTFail (" Load failed with error %zi" , error.code );
9898 return ;
9999 }
100- ExecuTorchLLMGenerationConfig *config =
101- [[ExecuTorchLLMGenerationConfig alloc ] initWithBlock: ^(ExecuTorchLLMGenerationConfig *config) {
102- config.sequenceLength = 50 ;
103- }];
104100 TokensPerSecondMetric *tokensPerSecondMetric = [TokensPerSecondMetric new ];
105101 [testCase measureWithMetrics: @[ tokensPerSecondMetric, [XCTClockMetric new ], [XCTMemoryMetric new ] ]
106102 block: ^{
107103 tokensPerSecondMetric.tokenCount = 0 ;
108104 BOOL status = [runner generateWithPrompt: @" Once upon a time"
109- config: config
105+ config: [[ExecuTorchLLMGenerationConfig alloc ] initWithBlock: ^(ExecuTorchLLMGenerationConfig *config) {
106+ config.sequenceLength = 50 ;
107+ }]
110108 tokenCallback: ^(NSString *token) {
111- tokensPerSecondMetric.tokenCount ++ ;
109+ ++ tokensPerSecondMetric.tokenCount ;
112110 }
113111 error: NULL ];
114112 XCTAssertTrue (status);
You can’t perform that action at this time.
0 commit comments