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

Add script for for finetuning a code llm #69

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mihail911
Copy link
Contributor

@mihail911 mihail911 commented Oct 9, 2024

What does this PR do?

This PR provides basic support for finetuning a code LLM. It is adapted from the following source: https://huggingface.co/learn/cookbook/en/fine_tuning_code_llm_on_single_gpu

NOTE: we still need to add appropriate eval metrics (of which there aren't very many standard ones for finetuning code llms)

@@ -83,13 +84,18 @@ def main():
retrieved = retriever.invoke(item[args.question_field])
item["retrieved"] = []
for doc_idx, doc in enumerate(retrieved):
pprint.pprint(doc)
Copy link
Contributor

Choose a reason for hiding this comment

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

These documents can get extremely long. Could you just use logging.info() here, and then set the appropriate logging level whenever you want to see the documents?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

stray print. removing

@@ -0,0 +1,447 @@
import argparse
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you leave a comment at the top of this file saying where it was originally forked from and how it's different from the fork?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had it below the imports but i can move up

@iuliaturc
Copy link
Contributor

Also, it seems like my fix for the github action didn't work. Could you run the following before I get round to fixing it:

pip install black
pip install isort

isort sage
black --line-length=120 sage

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.

2 participants