Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLMEval: Model Configuration Registry Remains Empty, Preventing Dynamic Model Selection #29

Open
1-ashraful-islam opened this issue Mar 17, 2024 · 1 comment

Comments

@1-ashraful-islam
Copy link
Contributor

I am currently working on implementing a model picker so selecting a new model does not require recompiling the app. I was trying to use

public static var registry = [String: ModelConfiguration]()

However, I am seeing this registry that is supposed to hold the configurations for available model always stays empty, and as such I can not use this to create a model picker. I am also noticing the bootstrap function, which is intended to populate the registry, is never called either. bootstrap function is referenced in a few places in the file.

static func bootstrap() {
switch bootstrapState {
case .idle:
bootstrapState = .bootstrapping
register(configurations: [
mistral7B4bit,
codeLlama13b4bit,
phi4bit,
gemma2bQuantized,
qwen205b4bit,
])
bootstrapState = .bootstrapped
case .bootstrapping:
break
case .bootstrapped:
break
}
}

I'm trying to understand the original design intention behind the registry and whether using it to create a dynamic model picker in ContentView is an appropriate use case.

As someone new to Swift development, I'm unsure if I'm missing a crucial step in the implementation or if there's an issue with how the bootstrap function is supposed to be triggered. Any guidance or insights on how to correctly implement or debug this feature would be greatly appreciated.

@davidkoski
Copy link
Collaborator

You aren't missing anything, the implementation falls slightly short. Perhaps registry should not be public (expose via a function?) or maybe it can be done with a lazy property.

Right now the only callers get to it via ModelConfiguration.mistral7B4bit (which will get the property directly) or via a call to configuration(id: ...) which will populate the registry. There wasn't a use case where somebody used the registry directly (but clearly that seems like a reasonable thing to do).

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

No branches or pull requests

2 participants