This repository was archived by the owner on Sep 30, 2024. It is now read-only.
replace modelOverridesRecommendedSettings with selfHostedModels#64164
Merged
replace modelOverridesRecommendedSettings with selfHostedModels#64164
Conversation
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
chrsmith
approved these changes
Jul 30, 2024
Contributor
chrsmith
left a comment
There was a problem hiding this comment.
Adding an approval to unblock you. But will need to take a closer look to internalize what you are saying later.
However, since the "preferred model" or "self-hosted models" aren't on the critical path for the LLM model selection or other sort of "standard" config code path, I'm not too worried about the breaking changes/regressing things here.
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, for providing self-hosted model' configuration (the models we've tested and believe work well), a site admin would use configuration like this:
A few problems with this:
serverSideConfigoptions specific to self-hosting, but it's naming "recommended settings" which kind of suggests otherwise!providerto actual API endpoint (because you have a single endpoint per model) - so not being able to configure themistralorbigcodeparts of the modelref above is problematic (restricts you to hosting 'only one model per provider'). The only escape for this currently is to abandon the defaults we provide withmodelOverridesRecommendedSettingsand rewrite it usingmodelOverridesfully yourself.serverSideConfig.openaicompatible.apiModelis a really common need - the most common option probably - but again there's no way to configure it here, only option is to abandon defaults and rewrite it yourself.mixtral-8x7b-instructis better - we currently don't have a good way to 'release a new version of the defaults' because the string is a model refmistral::v1::mixtral-8x7b-instructwe'd have to do this by appending-v2to the model name or something. Having versioning here is important because there are both:This PR fixes all of these^ issues by deprecating
modelOverridesRecommendedSettingsand introducing a newselfHostedModelsfield which looks like:Notably:
providerpart of the model ref is now configurable, enabling self-hosting more than one model per provider while still benefitting from our default model configurations."model": "starcoder2-7b@v1",is no longer a model ref, but rather a 'default model configuration name' - and has a version associated with it.overrideallows overriding properties of the default"model": "starcoder2-7b@v1",configuration, like theserverSideConfig.apiModel.Importance
I'm hoping to ship this to a few customers asap;
Test plan
Manually tested for now. Regression tests will come in the near future and are being tracked on Linear.
Changelog
Improved configuration functionality for Cody Enterprise with Self-hosted models.