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(framework): unsloth #4949

Merged
merged 2 commits into from
Sep 18, 2024
Merged

feat(framework): unsloth #4949

merged 2 commits into from
Sep 18, 2024

Conversation

aarnphm
Copy link
Contributor

@aarnphm aarnphm commented Aug 30, 2024

follow the https://colab.research.google.com/drive/1Ys44kVvmeZtnICzWz0xgpRnrIOjZAuxp?usp=sharing#scrollTo=QmUBVEnvCDJv

Then one can save with bentoml.unsloth.build_bento

bentoml.unsloth.build_bento(model, tokenizer, chat_template="<chat_template_that_trained_with>", quantization_method="bitsandbytes")

If model is continued from a fine-tune checkpoint, then model_name should be passed:

bentoml.unsloth.build_bento(model, tokenizer, model_name="llama-3-continued-from-checkpoint", chat_template="<chat_template_that_trained_with>", quantization_method="bitsandbytes")

supports llama3, gemma, gemma2, mistral and most chat templates that is supported with fine-tune. Based on BentoVLLM and OpenLLM logics for template.

@aarnphm aarnphm requested a review from a team as a code owner August 30, 2024 06:44
@aarnphm aarnphm requested review from larme and removed request for a team August 30, 2024 06:44
@aarnphm aarnphm changed the title feat(framework): unsloth integrations feat(framework): unsloth Aug 30, 2024
@frostming frostming force-pushed the dev/1.4 branch 2 times, most recently from 23335ae to 0c7300d Compare August 30, 2024 08:47
@frostming frostming force-pushed the dev/1.4 branch 2 times, most recently from 359008a to 364fd45 Compare August 30, 2024 10:15
Copy link

Code Coverage

Package Statements
bentoml 55.97% (9595 / 17141)
Summary 55.97% (9595 / 17141)

@frostming frostming force-pushed the dev/1.4 branch 4 times, most recently from fef9faa to d66d828 Compare September 3, 2024 09:39
@ssheng
Copy link
Collaborator

ssheng commented Sep 3, 2024

Could you please also create a documentation similar to this section of Unsloth? https://docs.unsloth.ai/tutorials/how-to-finetune-llama-3-and-export-to-ollama#id-13.-exporting-to-ollama

@aarnphm
Copy link
Contributor Author

aarnphm commented Sep 3, 2024

Could you please also create a documentation similar to this section of Unsloth? https://docs.unsloth.ai/tutorials/how-to-finetune-llama-3-and-export-to-ollama#id-13.-exporting-to-ollama

Should we submit this to unsloth?

@ssheng
Copy link
Collaborator

ssheng commented Sep 3, 2024

Should we submit this to unsloth?

We should but let's create a draft to review first.

@aarnphm aarnphm force-pushed the feat/unsloth branch 2 times, most recently from 28fc16e to a7c34de Compare September 7, 2024 22:47
@aarnphm aarnphm force-pushed the feat/unsloth branch 2 times, most recently from 4ccf0cf to 9d05b6e Compare September 7, 2024 22:48
@aarnphm aarnphm force-pushed the feat/unsloth branch 3 times, most recently from 70eb909 to 2dd95fc Compare September 11, 2024 07:38
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
@frostming frostming merged commit 9433af8 into dev/1.4 Sep 18, 2024
47 of 49 checks passed
@frostming frostming deleted the feat/unsloth branch September 18, 2024 01:27
frostming pushed a commit that referenced this pull request Sep 20, 2024
* feat: unsloth integrations

Signed-off-by: Aaron Pham <[email protected]>

* chore: update package export

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>

---------

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
frostming pushed a commit that referenced this pull request Sep 23, 2024
* feat: unsloth integrations

Signed-off-by: Aaron Pham <[email protected]>

* chore: update package export

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>

---------

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
frostming pushed a commit that referenced this pull request Sep 23, 2024
* feat: unsloth integrations

Signed-off-by: Aaron Pham <[email protected]>

* chore: update package export

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>

---------

Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants