Downloads · 30 days
0
tsaka99/llm-jp-3-13b-finetune
llm-jp-3-13b-finetune is a machine learning model from tsaka99. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a pipeline for fine-tuning and inference of a large language model (LLM) using Hugging Face's transformers library and PEFT (Parameter-Efficient Fine-Tuning) techniques such as LoRA. The pipel…
Downloads · 30 days
0
Access
Public
Updated Dec 5, 2024
Repo size
250 MB
Likes
0
Public
Click a slice to open those files.
.safetensors250 MB · 98%
From the Hugging Face model README
This repository contains a pipeline for fine-tuning and inference of a large language model (LLM) using Hugging Face's transformers library and PEFT (Parameter-Efficient Fine-Tuning) techniques such as LoRA. The pipeline is designed to handle Japanese instruction datasets and efficiently adapt large models to specific tasks.
Ensure you have access to a pretrained LLM. The model ID or path can be specified in the base_model_id variable. If the model is stored locally, update the path accordingly.
Prepare your dataset in JSON or JSONL format. For example:
{
"task_id": "1",
"input": "Translate this text to Japanese.",
"output": "このテキストを日本語に翻訳してください。"
}
Save the dataset in the appropriate directory, and provide the path in the load_dataset function.
Run the fine-tuning script with your dataset. Key configurations include:
r), scaling factor (lora_alpha), and dropout rate (lora_dropout).Use the inference script to process new tasks. Customize the prompt template to fit your specific use case. Results are saved in JSONL format for easy sharing and analysis.
The fine-tuning process leverages the following parameters:
r), scaling factor (lora_alpha), and dropout rate.base_model_id and new_model_id.python fine_tune.py
python inference.py
If you use this repository or the associated datasets, please cite the following paper:
関根聡, 安藤まや, 後藤美知子, 鈴木久美, 河原大輔, 井之上直也, 乾健太郎. Ichikara Instruction: LLMのための日本語インストラクションデータの構築. 言語処理学会第30回年次大会(2024).
This repository was developed with the support of Hugging Face, PEFT, and LoRA technologies.