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

support llama2 13b train and inference pipeline in fastchat #64

Merged
merged 14 commits into from
Oct 25, 2023

Conversation

Jasonqi146
Copy link
Member

@Jasonqi146 Jasonqi146 commented Oct 15, 2023

Closes #50

📑 Description

Added option of Hugging Face access token to use llama2 directory from hungging face.
Added option of shuffling the dataset before training.
Added script for generating dummy data to test fine-tune validity.
Modified train shell script for llama-2 experiments.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

ℹ Additional Information

@ruiyiw ruiyiw force-pushed the feature/llama2-13b-train branch from 52153ed to daa6c59 Compare October 19, 2023 00:46
@lwaekfjlk lwaekfjlk changed the title Feature/llama2 13b train support llama2 13b train and inference pipeline in fastchat Oct 24, 2023
@@ -109,6 +122,15 @@ def preprocess(
max_length=tokenizer.model_max_length,
truncation=True,
).input_ids
# print(input_ids.size())
Copy link
Member

Choose a reason for hiding this comment

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

delete those comments to make it clean

@@ -54,16 +54,19 @@ def match(self, model_path: str):

def load_model(self, model_path: str, from_pretrained_kwargs: dict):
revision = from_pretrained_kwargs.get("revision", "main")
print(from_pretrained_kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

delete this print line of code

data = json.load(f)

tokenizer = transformers.AutoTokenizer.from_pretrained(
'meta-llama/Llama-2-13b-chat-hf',
Copy link
Member

Choose a reason for hiding this comment

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

make it a model name instead of llama-specific

python3 -m fastchat.serve.cli --model-path ./checkpoint-shuffle/checkpoint-161 --hf-access-token "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" --conv-template "vicuna_v1.1"
Copy link
Member

Choose a reason for hiding this comment

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

change this to llama-inference.sh

@Jasonqi146 Jasonqi146 merged commit 703ff73 into main Oct 25, 2023
3 checks passed
@Jasonqi146 Jasonqi146 deleted the feature/llama2-13b-train branch October 25, 2023 00:07
@Jasonqi146 Jasonqi146 restored the feature/llama2-13b-train branch October 25, 2023 00:45
@Jasonqi146 Jasonqi146 deleted the feature/llama2-13b-train branch October 25, 2023 00:59
lwaekfjlk pushed a commit that referenced this pull request Nov 17, 2023
* add 2qa

* save

* change prompt

* eval v2

* add tables

* add reviewer, prompt

* add reviews

* rename

* tables

* new line

* update

* update

* rename
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.

[FEAT]: Build llama2-13b-chat-hf finetuning and inference pipeline in fastchat
3 participants