mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
add lora ft cmd to readme
This commit is contained in:
parent
bc7b588775
commit
f2606dc29d
3 changed files with 7 additions and 3 deletions
|
|
@ -1 +1,6 @@
|
|||
[Project doc](https://docs.google.com/document/d/1RCQDzlVU7YGoTwR84gLQfhxTv0RFnW6srQlqfCC2bvQ/edit?usp=sharing)
|
||||
[Project doc](https://docs.google.com/document/d/1RCQDzlVU7YGoTwR84gLQfhxTv0RFnW6srQlqfCC2bvQ/edit?usp=sharing)
|
||||
|
||||
### Finetuning the base model with LoRA adaptor
|
||||
```bash
|
||||
python hyperlora/intx_sft.py configs/default.yaml --model_name_or_path=meta-llama/Llama-3.2-1B-Instruct --num_train_epochs=100 --per_device_train_batch_size=8 --per_device_eval_batch_size=32 --overwrite_output_dir=True
|
||||
```
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ def tokenize_chat_messages(
|
|||
text,
|
||||
return_offsets_mapping=mask_assistant_inputs,
|
||||
add_special_tokens=False,
|
||||
**tokenizer_kwargs if tokenizer_kwargs is not None else {},
|
||||
**(tokenizer_kwargs or {}),
|
||||
)
|
||||
if mask_assistant_inputs:
|
||||
assistant_ranges = get_assistant_start_end_indices(messages, text)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ def get_model(
|
|||
device="cuda:0",
|
||||
dtype=torch.bfloat16,
|
||||
):
|
||||
# TODO: we could use lower precision during finetuning
|
||||
model_init_kwargs = dict(
|
||||
pretrained_model_name_or_path=model_name_or_path,
|
||||
device_map=device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue