-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44e087e
commit b37d9bc
Showing
30 changed files
with
7,173 additions
and
2,937 deletions.
There are no files selected for viewing
This file contains 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 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,15 @@ | ||
import os | ||
|
||
os.environ['CUDA_VISIBLE_DEVICES'] = '' | ||
os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' | ||
|
||
from transformers.trainer_utils import get_last_checkpoint | ||
|
||
latest = get_last_checkpoint("/root/lora-embedding-256-llama3.2-3b-multipack") | ||
latest | ||
|
||
from transformers import AutoTokenizer, AutoModelForCausalLM | ||
from peft import LoraConfig, get_peft_model, AutoPeftModelForCausalLM, PeftModel | ||
|
||
model = AutoPeftModelForCausalLM.from_pretrained(latest) | ||
model.push_to_hub('mesolitica/lora-embedding-256-llama3.2-3b-multipack', private = True) |
1,555 changes: 1,555 additions & 0 deletions
1,555
session/llama3/for-llama3.1-language-multipack.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,551 changes: 1,551 additions & 0 deletions
1,551
session/llama3/for-llama3.2-language-multipack.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,23 @@ | ||
WANDB_PROJECT="lora-embedding-256-llama3.2-1b-multipack" \ | ||
TORCH_DISTRIBUTED_DEBUG="info" \ | ||
torchrun --nproc_per_node 2 \ | ||
-m run-instruction-lora-embedding-multipack \ | ||
--model_name_or_path unsloth/Llama-3.2-1B-Instruct \ | ||
--per_device_train_batch_size 2 \ | ||
--gradient_accumulation_steps 6 \ | ||
--output_dir lora-embedding-256-llama3.2-1b-multipack \ | ||
--bf16 --do_train --do_eval false --num_train_epochs 5 \ | ||
--train_file /home/husein/ssd4/continue-training/packing-4096 \ | ||
--logging_steps 1 \ | ||
--learning_rate 2e-5 \ | ||
--learning_rate 2e-5 \ | ||
--weight_decay 0.01 \ | ||
--block_size 24576 \ | ||
--save_steps 100 \ | ||
--save_total_limit 3 \ | ||
--gradient_checkpointing true \ | ||
--neftune_noise_alpha 5.0 \ | ||
--torch_dtype bfloat16 \ | ||
--rank 256 \ | ||
--ddp_find_unused_parameters false \ | ||
--include_num_input_tokens_seen true |
This file contains 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,22 @@ | ||
WANDB_PROJECT="lora-embedding-256-llama3.2-3b-multipack" \ | ||
torchrun --nproc_per_node 4 \ | ||
-m run-instruction-lora-embedding-multipack \ | ||
--model_name_or_path unsloth/Llama-3.2-3B-Instruct \ | ||
--per_device_train_batch_size 3 \ | ||
--gradient_accumulation_steps 6 \ | ||
--output_dir lora-embedding-256-llama3.2-3b-multipack \ | ||
--bf16 --do_train --do_eval false --num_train_epochs 5 \ | ||
--train_file malaysian-llama3.2-24k-language-multipack \ | ||
--logging_steps 1 \ | ||
--learning_rate 2e-5 \ | ||
--learning_rate 2e-5 \ | ||
--weight_decay 0.01 \ | ||
--block_size 24576 \ | ||
--save_steps 100 \ | ||
--save_total_limit 3 \ | ||
--gradient_checkpointing true \ | ||
--neftune_noise_alpha 5.0 \ | ||
--torch_dtype bfloat16 \ | ||
--rank 256 \ | ||
--ddp_find_unused_parameters false \ | ||
--include_num_input_tokens_seen true |
2 changes: 1 addition & 1 deletion
2
...llama3/lora-embedding-128-8b-multipack.sh → session/llama3/lora-256-8b.sh
This file contains 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
File renamed without changes.
This file contains 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,5 @@ | ||
# Evaluation | ||
|
||
## How do we evaluate Google Translate? | ||
|
||
We created Playwright wrapper on top of Google Translate page, and we are not open source the code, but you should able to replicate pretty quick if you are use to Playwright. |
Oops, something went wrong.