Skip to content

Conversation

@vraspar
Copy link
Contributor

@vraspar vraspar commented Dec 18, 2024

  • Update App to use new GenAI API
  • Add ability to select model path from app to allow using multiple models in single build

@vraspar vraspar force-pushed the vraspar/llm-ios-app-update branch from a6c98fc to 6102533 Compare December 18, 2024 12:29
@vraspar vraspar requested a review from Copilot December 18, 2024 12:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • mobile/examples/phi-3/ios/LocalLLM/LocalLLM/ContentView.swift: Language not supported
  • mobile/examples/phi-3/ios/LocalLLM/LocalLLM/FolderPicker.swift: Language not supported
  • mobile/examples/phi-3/ios/LocalLLM/LocalLLM/GenAIGenerator.h: Language not supported
  • mobile/examples/phi-3/ios/LocalLLM/LocalLLM/GenAIGenerator.mm: Language not supported

@vraspar vraspar requested a review from edgchen1 December 19, 2024 09:27
@vraspar vraspar marked this pull request as ready for review April 15, 2025 23:54
@vraspar vraspar mentioned this pull request Jun 2, 2025
@vraspar vraspar requested a review from edgchen1 June 10, 2025 21:24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this file have a more meaningful name?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this file used?

Comment on lines +65 to +78
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
8AC409CD2DADE0EC00388525 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/genai_config.json",
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/model.onnx",
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/model.onnx.data",
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/special_tokens_map.json",
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/tokenizer_config.json",
"LLama-3.2-1B-int4-acc_4-gqa-webgpu-fp16/tokenizer.json",
);
target = 51D4C8D12BFD22D70029FCEA /* LocalLLM */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this section for? looks like it specifies llama3.2 specific files

);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ai.onnxruntime.genai.demo.LocalLLM;
PRODUCT_BUNDLE_IDENTIFIER = ai.onnxruntime.genai.demo.LocalLL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the identifier probably doesn't need to change

}

- (void)setModelFolderPath:(NSString*)modelPath {
@synchronized(self) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also synchronize access to self->model and self->tokenizer from generate? I'm not sure this is the right level that we should be synchronizing at. is there a way we can ensure that generate and setModelFolderPath don't get called at the same time?

perhaps the constructor can take the model path and we just create a new GenAIGenerator if the model path changes?

@snnn snnn closed this Sep 23, 2025
@snnn snnn reopened this Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants