-
Couldn't load subscription status.
- Fork 51
Add Model Registry #110
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
Merged
Merged
Add Model Registry #110
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| :caption: Introduction | ||
|
|
||
| ./notebooks/getting_started | ||
| ./notebooks/models | ||
| ./notebooks/datasets | ||
| ``` | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,14 @@ | ||
| from langchain_benchmarks.model_registration import model_registry | ||
| from langchain_benchmarks.registration import registry | ||
| from langchain_benchmarks.utils._langsmith import ( | ||
| clone_public_dataset, | ||
| download_public_dataset, | ||
| ) | ||
|
|
||
| # Please keep this list sorted! | ||
| __all__ = ["clone_public_dataset", "download_public_dataset", "registry"] | ||
| __all__ = [ | ||
| "clone_public_dataset", | ||
| "download_public_dataset", | ||
| "model_registry", | ||
| "registry", | ||
| ] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from langchain_benchmarks.schema import ModelRegistry, RegisteredModel | ||
|
|
||
| _OpenAIModels = [ | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-1106", | ||
| type="chat", | ||
| description=( | ||
| "The latest GPT-3.5 Turbo model with improved instruction following, " | ||
| "JSON mode, reproducible outputs, parallel function calling, and more. " | ||
| "Returns a maximum of 4,096 output tokens." | ||
| ), | ||
| params={ | ||
| "model": "gpt-3.5-turbo-1106", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo", | ||
| type="chat", | ||
| description="Currently points to gpt-3.5-turbo-0613.", | ||
| params={ | ||
| "model": "gpt-3.5-turbo", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-16k", | ||
| type="chat", | ||
| description="Currently points to gpt-3.5-turbo-0613.", | ||
| params={ | ||
| "model": "gpt-3.5-turbo-16k", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-instruct", | ||
| type="llm", | ||
| description=( | ||
| "Similar capabilities as text-davinci-003 but compatible with legacy " | ||
| "Completions endpoint and not Chat Completions." | ||
| ), | ||
| params={ | ||
| "model": "gpt-3.5-turbo-instruct", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-0613", | ||
| type="chat", | ||
| description=( | ||
| "Legacy Snapshot of gpt-3.5-turbo from June 13th 2023. " | ||
| "Will be deprecated on June 13, 2024." | ||
| ), | ||
| params={ | ||
| "model": "gpt-3.5-turbo-0613", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-16k-0613", | ||
| type="chat", | ||
| description=( | ||
| "Legacy Snapshot of gpt-3.5-16k-turbo from June 13th 2023. " | ||
| "Will be deprecated on June 13, 2024." | ||
| ), | ||
| params={ | ||
| "model": "gpt-3.5-turbo-16k-0613", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="gpt-3.5-turbo-0301", | ||
| type="chat", | ||
| description=( | ||
| "Legacy Snapshot of gpt-3.5-turbo from March 1st 2023. " | ||
| "Will be deprecated on June 13th 2024." | ||
| ), | ||
| params={ | ||
| "model": "gpt-3.5-turbo-0301", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="text-davinci-003", | ||
| type="llm", | ||
| description=( | ||
| "Legacy Can do language tasks with better quality and consistency than " | ||
| "the curie, babbage, or ada models. Will be deprecated on Jan 4th 2024." | ||
| ), | ||
| params={ | ||
| "model": "text-davinci-003", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="text-davinci-002", | ||
| type="llm", | ||
| description=( | ||
| "Legacy Similar capabilities to text-davinci-003 but trained with " | ||
| "supervised fine-tuning instead of reinforcement learning. " | ||
| "Will be deprecated on Jan 4th 2024." | ||
| ), | ||
| params={ | ||
| "model": "text-davinci-002", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="openai", | ||
| name="code-davinci-002", | ||
| type="llm", | ||
| description="Legacy Optimized for code-completion tasks. Will be deprecated " | ||
| "on Jan 4th 2024.", | ||
| params={ | ||
| "model": "code-davinci-002", | ||
| }, | ||
| ), | ||
| ] | ||
|
|
||
| _FireworksModels = [ | ||
| RegisteredModel( | ||
| provider="fireworks", | ||
| name="llama-v2-7b-chat-fw", | ||
| type="chat", | ||
| description="7b parameter LlamaChat model", | ||
| params={ | ||
| "model": "accounts/fireworks/models/llama-v2-7b-chat", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="fireworks", | ||
| name="llama-v2-13b-chat-fw", | ||
| type="chat", | ||
| description="13b parameter LlamaChat model", | ||
| params={ | ||
| "model": "accounts/fireworks/models/llama-v2-13b-chat", | ||
| }, | ||
| ), | ||
| RegisteredModel( | ||
| provider="fireworks", | ||
| name="llama-v2-70b-chat-fw", | ||
| type="chat", | ||
| description="70b parameter LlamaChat model", | ||
| params={ | ||
| "model": "accounts/fireworks/models/llama-v2-70b-chat", | ||
| }, | ||
| ), | ||
| ] | ||
|
|
||
| model_registry = ModelRegistry(registered_models=_OpenAIModels + _FireworksModels) |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No gpt-4 or gpt-4-1106-preview? What about claude?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we can add all of those -- just wanted to get something initial in for a review / consensus that we want this