abrahammg commited on
Commit
d6aac28
·
verified ·
1 Parent(s): 01da337

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -16
README.md CHANGED
@@ -9,11 +9,11 @@ language:
9
 
10
  # Llama3-8B Adapter Fine-Tuned for Galician language
11
 
12
- This repository contains a Lora adapter to finetune Meta's LLaMA 3-8B Instruct LLM to Galician language.
13
 
14
- ## Model Description
15
 
16
- This Lora adapter has been specifically fine-tuned to understand and generate text in Galician. It was refined using a modified version of the [irlab-udc/alpaca_data_galician](https://huggingface.co/datasets/irlab-udc/alpaca_data_galician) dataset, enriched with synthetic data to enhance its text generation and comprehension capabilities in specific contexts.
17
 
18
  ### Technical Details
19
 
@@ -35,7 +35,7 @@ The project is still in the testing phase, and the training parameters will cont
35
  - learning_rate=5e-5
36
  - max_grad_norm=1.0
37
 
38
- ## Testing The Model
39
 
40
  Below, we have several examples of question-answer pairs comparing the pure Llama3 model with the Llama3 model fine tunned for the Galician language.
41
 
@@ -44,7 +44,7 @@ Below, we have several examples of question-answer pairs comparing the pure Llam
44
  User: Cal é a capital de Canadá?
45
  Assistant: Não! Cal não é a capital de Canadá. A capital de Canadá é Ottawa.
46
  ```
47
- *Llama3-8B-Galician-Chat* ✅ 👍
48
  ```bash
49
  User: Cal é a capital de Canadá?
50
  Assistant: A capital de Canadá é Ottawa.
@@ -54,7 +54,7 @@ Assistant: A capital de Canadá é Ottawa.
54
  User: Cantos habitantes ten Galicia?
55
  Assistant: Según el Instituto Nacional de Estadística (INE) de España, la población residente en Galicia al 1 de enero de 2021 era de aproximadamente 2.79 millones de personas.
56
  ```
57
- *Llama3-8B-Galician-Chat* ✅ 👍
58
  ```bash
59
  User: Cantos habitantes ten Galicia?
60
  Assistant: Segundo as últimas estimacións, Galicia ten uns 2,8 millóns de habitantes.
@@ -62,18 +62,18 @@ Assistant: Segundo as últimas estimacións, Galicia ten uns 2,8 millóns de hab
62
 
63
  ## How to Use the Model
64
 
65
- To use this model, follow the example code provided below. Ensure you have the necessary libraries installed (e.g., Hugging Face's `transformers`).
66
 
67
  ### Installation
68
  ```bash
69
- git clone https://huggingface.co/abrahammg/Llama3-8B-Galician-Chat
70
  ```
71
 
72
  ```bash
73
  pip install transformers bitsandbytes "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" llmtuner xformers
74
  ```
75
 
76
- ### Run the model
77
 
78
  ```bash
79
  from llmtuner import ChatModel
@@ -81,10 +81,10 @@ from llmtuner.extras.misc import torch_gc
81
 
82
  chat_model = ChatModel(dict(
83
  model_name_or_path="unsloth/llama-3-8b-Instruct-bnb-4bit", # use bnb-4bit-quantized Llama-3-8B-Instruct model
84
- adapter_name_or_path="./", # load the saved LoRA adapters
85
- finetuning_type="lora", # same to the one in training
86
- template="llama3", # same to the one in training
87
- quantization_bit=4, # load 4-bit quantized model
88
  use_unsloth=True, # use UnslothAI's LoRA optimization for 2x faster generation
89
  ))
90
 
@@ -114,12 +114,12 @@ torch_gc()
114
  ## Citation
115
 
116
  ```markdown
117
- @misc{Llama3-8B-Galician-Chat,
118
  author = {Abraham Martínez Gracia},
119
  organization={Galicia Supercomputing Center},
120
- title = {Llama3-8B-Galician-Chat: A finetuned chat model for Galician language},
121
  year = {2024},
122
- url = {https://huggingface.co/abrahammg/Llama3-8B-Galician-Chat}
123
  }
124
  ```
125
 
 
9
 
10
  # Llama3-8B Adapter Fine-Tuned for Galician language
11
 
12
+ This repository contains a Lora Adapter to finetune Meta's LLaMA 3-8B Instruct LLM to Galician language.
13
 
14
+ ## Model Adapter Description
15
 
16
+ This Lora Adapter has been specifically fine-tuned to understand and generate text in Galician. It was refined using a modified version of the [irlab-udc/alpaca_data_galician](https://huggingface.co/datasets/irlab-udc/alpaca_data_galician) dataset, enriched with synthetic data to enhance its text generation and comprehension capabilities in specific contexts.
17
 
18
  ### Technical Details
19
 
 
35
  - learning_rate=5e-5
36
  - max_grad_norm=1.0
37
 
38
+ ## Testing The Adapter
39
 
40
  Below, we have several examples of question-answer pairs comparing the pure Llama3 model with the Llama3 model fine tunned for the Galician language.
41
 
 
44
  User: Cal é a capital de Canadá?
45
  Assistant: Não! Cal não é a capital de Canadá. A capital de Canadá é Ottawa.
46
  ```
47
+ *Llama3-8B-Galician-Chat-Lora* ✅ 👍
48
  ```bash
49
  User: Cal é a capital de Canadá?
50
  Assistant: A capital de Canadá é Ottawa.
 
54
  User: Cantos habitantes ten Galicia?
55
  Assistant: Según el Instituto Nacional de Estadística (INE) de España, la población residente en Galicia al 1 de enero de 2021 era de aproximadamente 2.79 millones de personas.
56
  ```
57
+ *Llama3-8B-Galician-Chat-Lora* ✅ 👍
58
  ```bash
59
  User: Cantos habitantes ten Galicia?
60
  Assistant: Segundo as últimas estimacións, Galicia ten uns 2,8 millóns de habitantes.
 
62
 
63
  ## How to Use the Model
64
 
65
+ To use this adapter, follow the example code provided below. Ensure you have the necessary libraries installed (e.g., Hugging Face's `transformers`).
66
 
67
  ### Installation
68
  ```bash
69
+ git clone https://huggingface.co/abrahammg/Llama3-8B-Galician-Chat-Lora
70
  ```
71
 
72
  ```bash
73
  pip install transformers bitsandbytes "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" llmtuner xformers
74
  ```
75
 
76
+ ### Run the adapter
77
 
78
  ```bash
79
  from llmtuner import ChatModel
 
81
 
82
  chat_model = ChatModel(dict(
83
  model_name_or_path="unsloth/llama-3-8b-Instruct-bnb-4bit", # use bnb-4bit-quantized Llama-3-8B-Instruct model
84
+ adapter_name_or_path="./", # load Llama3-8B-Galician-Chat-Lora adapter
85
+ finetuning_type="lora",
86
+ template="llama3",
87
+ quantization_bit=4, # load 4-bit quantized model
88
  use_unsloth=True, # use UnslothAI's LoRA optimization for 2x faster generation
89
  ))
90
 
 
114
  ## Citation
115
 
116
  ```markdown
117
+ @misc{Llama3-8B-Galician-Chat-Lora,
118
  author = {Abraham Martínez Gracia},
119
  organization={Galicia Supercomputing Center},
120
+ title = {Llama3-8B-Galician-Chat-Lora: A finetuned chat model for Galician language},
121
  year = {2024},
122
+ url = {https://huggingface.co/abrahammg/Llama3-8B-Galician-Chat-Lora}
123
  }
124
  ```
125