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

feat: add Fireworks AI component #237

Merged
merged 12 commits into from
Aug 11, 2024
Merged

Conversation

namwoam
Copy link
Collaborator

@namwoam namwoam commented Jul 24, 2024

Because

  • We want to integrate Fireworks AI Client into our VDP pipeline platform.

This commit

  • Added the Fireworks AI Component, which supports the following tasks:
    • (a) TASK_TEXT_GENERATION_CHAT
      Models: llama3.1 (405b, 70b, 9b), llama3 (70b, 8b), gemma2-9b, phi-3-vision-128K, deepseek-coder, qwen2 (72b) and more
    • (b) TASK_TEXT_EMBEDDINGS
      Models: nomic-ai/nomic-embed, thenlper/gte, WhereIsAI/UAE

API Documentation: https://docs.fireworks.ai/api-reference/introduction
Pricing Documentation: https://fireworks.ai/pricing

@namwoam namwoam marked this pull request as draft July 24, 2024 00:11
@namwoam namwoam changed the title Namwoam/fireworks feat: add Fireworks AI component Jul 24, 2024
ai/fireworksai/v0/main.go Dismissed Show dismissed Hide dismissed
@namwoam
Copy link
Collaborator Author

namwoam commented Jul 24, 2024

image

Above is the performance of llama3-70b-it across different providers. This sector is extremely competitive and I am not sure if we will support all the providers?

Copy link

codecov bot commented Jul 28, 2024

Codecov Report

Attention: Patch coverage is 55.80110% with 80 lines in your changes missing coverage. Please review.

Project coverage is 37.15%. Comparing base (4aeae69) to head (21e4fb7).
Report is 20 commits behind head on main.

Files Patch % Lines
ai/fireworksai/v0/tasks.go 55.67% 38 Missing and 5 partials ⚠️
ai/fireworksai/v0/client.go 36.00% 16 Missing ⚠️
ai/fireworksai/v0/main.go 71.69% 13 Missing and 2 partials ⚠️
store/store.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #237      +/-   ##
==========================================
- Coverage   40.70%   37.15%   -3.55%     
==========================================
  Files         121      153      +32     
  Lines       11842    19404    +7562     
==========================================
+ Hits         4820     7210    +2390     
- Misses       6402    11138    +4736     
- Partials      620     1056     +436     
Flag Coverage Δ
unittests 37.15% <55.80%> (-3.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@namwoam namwoam marked this pull request as ready for review July 28, 2024 02:26
chuang8511
chuang8511 previously approved these changes Aug 8, 2024
Copy link
Member

@chuang8511 chuang8511 left a comment

Choose a reason for hiding this comment

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

lgtm.

@chuang8511
Copy link
Member

@namwoam
Btw, does Fireworks have their official tokenizer that we can use?
It will be used in Text Component ChunkTask

@namwoam
Copy link
Collaborator Author

namwoam commented Aug 8, 2024

All their model are open sourced, so I guess it could be imported from huggingface?

@chuang8511
Copy link
Member

chuang8511 commented Aug 9, 2024

@namwoam
Could you help me check the pricing?
I am not sure these models' params count.

remaining models

deepseek-coder-v2-instruct
deepseek-coder-v2-lite-instruct
phi-3-vision-128k-instruct
nomic-ai/nomic-embed-text-v1.5
nomic-ai/nomic-embed-text-v1
WhereIsAI/UAE-Large-V1
thenlper/gte-large
thenlper/gte-base

image

image

@namwoam
Copy link
Collaborator Author

namwoam commented Aug 9, 2024

Hello, the parameter count are as follows:

Text models:

  1. deepseek-coder-v2-instruct: 236b MoE
  2. deepseek-coder-v2-lite-instruct: 16b MoE source: huggingface
  3. phi-3-vision-128k-instruct: 4.2b source: phi3 technical report under section 6.1

Embedding models:

  1. nomic-embed-text-v1.5: 137m source: huggingface
  2. nomic-embed-text-v1: 137m source: huggingface
  3. UAE-Large-V1: 335m source: huggingface
  4. gte-large: 335m source: huggingface
  5. gte-base: 109m source: huggingface

The pricing for embedding models:
image

@donch1989 donch1989 merged commit 0c40652 into instill-ai:main Aug 11, 2024
6 checks passed
@chuang8511
Copy link
Member

@namwoam
I still cannot match which price is correct. I will take out from Instill Credit first.
Please help us check it again. Thank you.

  • deepseek-coder-v2-instruct: 236b MoE
    image

✅ deepseek-coder-v2-lite-instruct: 16b MoE source: huggingface
-> 0.5
✅ phi-3-vision-128k-instruct: 4.2b source: phi3 technical report under section 6.1
image
-> 0.2

@namwoam
Copy link
Collaborator Author

namwoam commented Aug 12, 2024

Ok, no problem.

donch1989 pushed a commit that referenced this pull request Aug 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.25.0-beta](v0.24.0-beta...v0.25.0-beta)
(2024-08-13)


### Features

* add a hook to avoid we miss make document
([#244](#244))
([4c4531d](4c4531d))
* add elasticsearch component
([#211](#211))
([eb492ca](eb492ca))
* add Fireworks AI component
([#237](#237))
([0c40652](0c40652))
* add Groq component
([#269](#269))
([1401220](1401220))
* add mongodb component
([#198](#198))
([2cb550f](2cb550f))
* add qdrant component
([#271](#271))
([bd2b9e6](bd2b9e6))
* add weaviate component
([#246](#246))
([cb3e667](cb3e667))
* add WhatsApp component
([#226](#226))
([28d0de8](28d0de8))
* **artifact:** add artifact component
([#268](#268))
([dabf472](dabf472))
* **artifact:** add artifact component
([#275](#275))
([15fc0d2](15fc0d2))
* **document:** integrate pdf2md in document operator
([#277](#277))
([07360d1](07360d1))
* **groq, fireworksai:** take out the unsupported models from instill
credit ([#283](#283))
([8978acd](8978acd))
* make component ID accessible on IExecution
([#257](#257))
([dd63656](dd63656))
* **openai:** support `gpt-4o-2024-08-06` and structured output
([#280](#280))
([8bdaef7](8bdaef7))
* **sql:** add TASK_INSERT_MANY and fix sql query validation
([#252](#252))
([3a93cea](3a93cea))
* **text:** add tokenizer for cohere & new gpt-4o
([#276](#276))
([5d8cec3](5d8cec3))
* **text:** revert "add tokenizer for cohere & new gpt-4o
([#276](#276))"
([910a330](910a330))


### Bug Fixes

* **artifact:** add the description to remind users to add file
extension ([#281](#281))
([5ff5d7a](5ff5d7a))
* ignore bold case and add all line to result
([#272](#272))
([219c77e](219c77e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👋 Done
4 participants