From 9adc0926cbde37d1f8c3f43676269801f1067126 Mon Sep 17 00:00:00 2001 From: Jack Zhang <32371937+jackzhxng@users.noreply.github.com> Date: Thu, 1 May 2025 15:47:35 -0700 Subject: [PATCH 1/2] Fix iOS app frontend build --- .../apple_ios/LLaMA/LLaMA/Application/ContentView.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift b/examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift index cc1567b3cde..f8b8a0eec1f 100644 --- a/examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift +++ b/examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift @@ -495,7 +495,6 @@ struct ContentView: View { var message = messages.removeLast() message.text += textToFlush message.text += message.text.isEmpty ? "Thinking...\n\n" : "\n\nThinking...\n\n" - message.format = .italic message.tokenCount += flushedTokenCount + 1 // + 1 for the start thinking token. message.dateUpdated = Date() messages.append(message) @@ -509,7 +508,6 @@ struct ContentView: View { var message = messages.removeLast() message.text += textToFlush message.text += "\n\nFinished thinking.\n\n" - message.format = .italic message.tokenCount += flushedTokenCount + 1 // + 1 for the end thinking token. message.dateUpdated = Date() messages.append(message) From a87fe23c67f84bb09496395b82dd08886177ba55 Mon Sep 17 00:00:00 2001 From: Jack Zhang <32371937+jackzhxng@users.noreply.github.com> Date: Thu, 1 May 2025 16:03:43 -0700 Subject: [PATCH 2/2] Allow tokenizer.json in iOS LLM benchmark tests --- extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm b/extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm index 985f77956b6..fe5e816d6a7 100644 --- a/extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm +++ b/extension/benchmark/apple/Benchmark/Tests/LLaMA/LLaMATests.mm @@ -63,7 +63,7 @@ @implementation LLaMATests return [filename hasSuffix:@".pte"] && [filename.lowercaseString containsString:@"llama"]; }, @"tokenizer" : ^BOOL(NSString *filename) { - return [filename isEqual:@"tokenizer.bin"] || [filename isEqual:@"tokenizer.model"]; + return [filename isEqual:@"tokenizer.bin"] || [filename isEqual:@"tokenizer.model"] || [filename isEqual:@"tokenizer.json"]; }, }; }