-
Notifications
You must be signed in to change notification settings - Fork 529
Fireworks AI Conversational Models #1177
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
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5540b2b
Fireworks AI Conversational Models
teofeliu d2b7dee
post-rebases fixes
julien-c 7d19138
small tweak
julien-c 9034b7d
New way of injecting mapping into tests + record VCR
julien-c 3dacd30
Update fireworks-ai.ts
julien-c 832a209
Update README.md
Wauplin 59e180d
Merge branch 'main' into fireworks-ai-text
teofeliu 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
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
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 |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ Your access token should be kept private. If you need to protect it in front-end | |
|
|
||
| You can send inference requests to third-party providers with the inference client. | ||
|
|
||
| Currently, we support the following providers: [Fal.ai](https://fal.ai), [Replicate](https://replicate.com), [Together](https://together.xyz) and [Sambanova](https://sambanova.ai). | ||
| Currently, we support the following providers: [Fal.ai](https://fal.ai), [Replicate](https://replicate.com), [Together](https://together.xyz), [Sambanova](https://sambanova.ai), and [Fireworks AI](https://fireworks.ai). | ||
|
|
||
| To send requests to a third-party provider, you have to pass the `provider` parameter to the inference function. Make sure your request is authenticated with an access token. | ||
| ```ts | ||
|
|
@@ -68,6 +68,7 @@ Only a subset of models are supported when requesting third-party providers. You | |
| - [Replicate supported models](./src/providers/replicate.ts) | ||
| - [Sambanova supported models](./src/providers/sambanova.ts) | ||
| - [Together supported models](./src/providers/together.ts) | ||
| - [Fireworks AI supported models](./src/providers/fireworks-ai.ts) | ||
|
||
| - [HF Inference API (serverless)](https://huggingface.co/models?inference=warm&sort=trending) | ||
|
|
||
| ❗**Important note:** To be compatible, the third-party API must adhere to the "standard" shape API we expect on HF model pages for each pipeline task type. | ||
|
|
||
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
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
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,15 +1,25 @@ | ||
| import type { ModelId } from "../types"; | ||
| import type { InferenceProvider } from "../types"; | ||
| import { type ModelId } from "../types"; | ||
|
|
||
| type ProviderId = string; | ||
|
|
||
| /** | ||
| * If you want to try to run inference for a new model locally before it's registered on huggingface.co | ||
| * for a given Inference Provider, | ||
| * you can add it to the following dictionary, for dev purposes. | ||
| * | ||
| * We also inject into this dictionary from tests. | ||
| */ | ||
| export const HARDCODED_MODEL_ID_MAPPING: Record<ModelId, ProviderId> = { | ||
| export const HARDCODED_MODEL_ID_MAPPING: Record<InferenceProvider, Record<ModelId, ProviderId>> = { | ||
| /** | ||
| * "HF model ID" => "Model ID on Inference Provider's side" | ||
| * | ||
| * Example: | ||
| * "Qwen/Qwen2.5-Coder-32B-Instruct": "Qwen2.5-Coder-32B-Instruct", | ||
| */ | ||
| // "Qwen/Qwen2.5-Coder-32B-Instruct": "Qwen2.5-Coder-32B-Instruct", | ||
| "fal-ai": {}, | ||
| "fireworks-ai": {}, | ||
| "hf-inference": {}, | ||
| replicate: {}, | ||
| sambanova: {}, | ||
| together: {}, | ||
| }; |
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,18 @@ | ||
| export const FIREWORKS_AI_API_BASE_URL = "https://api.fireworks.ai/inference"; | ||
|
|
||
| /** | ||
| * See the registered mapping of HF model ID => Fireworks model ID here: | ||
| * | ||
| * https://huggingface.co/api/partners/fireworks/models | ||
| * | ||
| * This is a publicly available mapping. | ||
| * | ||
| * If you want to try to run inference for a new model locally before it's registered on huggingface.co, | ||
| * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes. | ||
| * | ||
| * - If you work at Fireworks and want to update this mapping, please use the model mapping API we provide on huggingface.co | ||
| * - If you're a community member and want to add a new supported HF model to Fireworks, please open an issue on the present repo | ||
| * and we will tag Fireworks team members. | ||
| * | ||
| * Thanks! | ||
| */ |
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
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
Large diffs are not rendered by default.
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.
given this list is expected to expand quite a lot, I'd turn the sentence into a bullet list + order alphabetically
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.
Agree with your suggestions, can you push them directly to this PR?
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.
done in 832a209