Instructions to use VSSA-SDSA/LT_AI_DLKVM_demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VSSA-SDSA/LT_AI_DLKVM_demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VSSA-SDSA/LT_AI_DLKVM_demo")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("VSSA-SDSA/LT_AI_DLKVM_demo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VSSA-SDSA/LT_AI_DLKVM_demo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VSSA-SDSA/LT_AI_DLKVM_demo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VSSA-SDSA/LT_AI_DLKVM_demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/VSSA-SDSA/LT_AI_DLKVM_demo
- SGLang
How to use VSSA-SDSA/LT_AI_DLKVM_demo with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "VSSA-SDSA/LT_AI_DLKVM_demo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VSSA-SDSA/LT_AI_DLKVM_demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "VSSA-SDSA/LT_AI_DLKVM_demo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VSSA-SDSA/LT_AI_DLKVM_demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use VSSA-SDSA/LT_AI_DLKVM_demo with Docker Model Runner:
docker model run hf.co/VSSA-SDSA/LT_AI_DLKVM_demo
Initial model upload
Browse files- README.md +341 -3
- adapter_config.json +46 -0
- adapter_model.safetensors +3 -0
- requirements.txt +3 -0
README.md
CHANGED
|
@@ -1,3 +1,341 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- lt
|
| 4 |
+
base_model:
|
| 5 |
+
- neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
library_name: transformers
|
| 8 |
+
tags:
|
| 9 |
+
- summary
|
| 10 |
+
- lithuanian
|
| 11 |
+
- llama3
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# BLKT-Summary-Llama3-1B LoRA adapterio kortelė (LT) / LoRA Adapter Card for BLKT-Summary-Llama3-1B (EN)
|
| 15 |
+
|
| 16 |
+
## Turinys / Table of contents
|
| 17 |
+
- [Adapterio informacija](#adapterio-informacija) (LT) / [Adapter Information](#adapter-information) (EN)
|
| 18 |
+
- [Kaip pradėti naudoti adapterį](#kaip-pradėti-naudoti-adapterį) (LT) / [How to Get Started with the Adapter](#how-to-get-started-with-the-adapter) (EN)
|
| 19 |
+
- [Naudojimo sritis](#naudojimo-sritis) (LT) / [Uses](#uses) (EN)
|
| 20 |
+
- [Mokymo detalės](#mokymo-detalės) (LT) / [Training Details](#training-details) (EN)
|
| 21 |
+
- [Įvertinimas](#įvertinimas) (LT) / [Evaluation](#evaluation) (EN)
|
| 22 |
+
- [Citavimas](#citavimas) (LT) / [Citation](#citation) (EN)
|
| 23 |
+
- [Licencija](#licencija) (LT) / [License](#license) (EN)
|
| 24 |
+
|
| 25 |
+
## Adapterio informacija
|
| 26 |
+
|
| 27 |
+
**Adapterio pavadinimas:** BLKT-Summary-Llama3-LoRA-Adapter
|
| 28 |
+
|
| 29 |
+
**Bazinis modelis:** [neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC](https://huggingface.co/neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC)
|
| 30 |
+
|
| 31 |
+
**Architektūra:** Llama3 CausalLM
|
| 32 |
+
|
| 33 |
+
**Užduotis:** Abstrakčiųjų santraukų generavimas
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## Kaip pradėti naudoti adapterį
|
| 37 |
+
|
| 38 |
+
Šį adapterį galime naudoti lietuviškų abstrakčiųjų santraukų generavime (angl. inference) su Hugging Face `transformers` ir `peft` bibliotekomis.
|
| 39 |
+
|
| 40 |
+
### Aplinkos pasiruošimas
|
| 41 |
+
|
| 42 |
+
Įsidiegiame papildomas bibliotekas iš bibliotekų reikalavimo failo. Naudota: ***Python 3.12.12***
|
| 43 |
+
|
| 44 |
+
```
|
| 45 |
+
pip install -r requirements.txt
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
### Kodo pavyzdys
|
| 51 |
+
|
| 52 |
+
```python
|
| 53 |
+
import torch
|
| 54 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 55 |
+
from peft import PeftModel
|
| 56 |
+
|
| 57 |
+
MODEL_ID = "neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC"
|
| 58 |
+
LORA_ADAPTER = "CARD-AI/BLKT-Llama3-1B-32k-LoRA-Adapter"
|
| 59 |
+
MAX_NEW_TOKENS = 200
|
| 60 |
+
|
| 61 |
+
tekstas = "Jūsų tekstas santraukos generavimui"
|
| 62 |
+
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID,use_fast=True)
|
| 64 |
+
if tokenizer.pad_token is None:
|
| 65 |
+
tokenizer.pad_token = tokenizer.eos_token
|
| 66 |
+
tokenizer.padding_side = "left"
|
| 67 |
+
|
| 68 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 69 |
+
MODEL_ID,
|
| 70 |
+
torch_dtype=torch.bfloat16,
|
| 71 |
+
device_map={"":0},
|
| 72 |
+
attn_implementation="sdpa"
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
+
model = PeftModel.from_pretrained(
|
| 76 |
+
base_model,
|
| 77 |
+
LORA_ADAPTER,
|
| 78 |
+
is_trainable=False
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
model.eval()
|
| 82 |
+
|
| 83 |
+
prompt = (
|
| 84 |
+
f"<|im_start|>Teksto pradžia:\n{tekstas}<|im_end|>\n"
|
| 85 |
+
f"<|im_start|>Santraukos pradžia:\n"
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 89 |
+
inputs.pop("token_type_ids", None)
|
| 90 |
+
|
| 91 |
+
end_tokens = ["<|im_end|>"]
|
| 92 |
+
eos_ids = tokenizer(end_tokens, add_special_tokens=False).input_ids
|
| 93 |
+
eos_ids = [ids[0] for ids in eos_ids if len(ids) == 1]
|
| 94 |
+
|
| 95 |
+
with torch.no_grad():
|
| 96 |
+
outputs = model.generate(
|
| 97 |
+
**inputs,
|
| 98 |
+
max_new_tokens=MAX_NEW_TOKENS,
|
| 99 |
+
do_sample=False,
|
| 100 |
+
repetition_penalty=2.5,
|
| 101 |
+
eos_token_id = eos_ids,
|
| 102 |
+
pad_token_id = tokenizer.pad_token_id,
|
| 103 |
+
num_beams = 2,
|
| 104 |
+
early_stopping=True
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
generated = tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):], skip_special_tokens=True).strip()
|
| 108 |
+
print(generated)
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
### `Flash-Attention` palaikymas
|
| 112 |
+
|
| 113 |
+
Kurtas modelis palaiko `flash_attention_2`, tačiau, siekiant jį naudoti reikalinga įsidiegti papildomas bibliotekas.
|
| 114 |
+
|
| 115 |
+
`Python 3.12`
|
| 116 |
+
|
| 117 |
+
```
|
| 118 |
+
pip install flash-attn==2.7.4.post1 --no-build-isolation
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
`Python 3.13`
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp313-cp313-linux_x86_64.whl
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
Susidiegus biblioteką reikia atnaujinti bazinio modelio užkrovimo skriptą.
|
| 128 |
+
|
| 129 |
+
```python
|
| 130 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 131 |
+
MODEL_ID,
|
| 132 |
+
torch_dtype=torch.bfloat16,
|
| 133 |
+
device_map={"":0},
|
| 134 |
+
attn_implementation="flash_attention_2"
|
| 135 |
+
)
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
## Naudojimo sritis
|
| 139 |
+
|
| 140 |
+
- Abstrakčiųjų santraukų generavimas lietuviškiems tekstams
|
| 141 |
+
- Taikymai: teisės, medicinos, žiniasklaidos ir informacinių technologijų temoms
|
| 142 |
+
|
| 143 |
+
## Mokymo detalės
|
| 144 |
+
|
| 145 |
+
Naudotas duomenų rinkinys: [Tekstyno nuoroda]()
|
| 146 |
+
|
| 147 |
+
### Mokymo konfigūracija
|
| 148 |
+
|
| 149 |
+
```yml
|
| 150 |
+
lora_settings:
|
| 151 |
+
r: 64
|
| 152 |
+
lora_alpha: 128
|
| 153 |
+
target_modules: ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
|
| 154 |
+
lora_dropout: 0.05
|
| 155 |
+
task_type: "CAUSAL_LM"
|
| 156 |
+
use_rslora: True
|
| 157 |
+
training:
|
| 158 |
+
per_device_train_batch_size: 4
|
| 159 |
+
gradient_accumulation_steps: 16
|
| 160 |
+
bf16: True
|
| 161 |
+
learning_rate: 6e-5
|
| 162 |
+
warmup_ratio: 0.063
|
| 163 |
+
weight_decay: 0.053
|
| 164 |
+
num_train_epochs: 4
|
| 165 |
+
lr_scheduler_type: "cosine"
|
| 166 |
+
optim: "adafactor"
|
| 167 |
+
adam_epsilon: 1e-6
|
| 168 |
+
max_grad_norm: 1.0
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
**Aplinka:** Hugging Face Transformers (v4.54.1)
|
| 172 |
+
**Aparatinė įranga:** 1× NVIDIA RTX A6000 ADA
|
| 173 |
+
|
| 174 |
+
## Įvertinimas
|
| 175 |
+
|
| 176 |
+
| Rouge-1 | Rouge-2 | Rouge-L | BertScore Preciziškumas | BertScore iškvietimas | BertScore F1 | BLEU |
|
| 177 |
+
| :------------- | :------------- | :------------- | :---------- | :---- | :---- | :---- |
|
| 178 |
+
| 0.3230 | 0.1377 | 0.2135 | 0.8786 | 0.8683 | 0.8732 | 10.2290 |
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
## Citavimas
|
| 182 |
+
|
| 183 |
+
## Licencija
|
| 184 |
+
|
| 185 |
+
## Adapter Information
|
| 186 |
+
|
| 187 |
+
**Adapter Name:** BLKT-Summary-Llama3-LoRA-Adapter
|
| 188 |
+
|
| 189 |
+
**Base Model:** [neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC](https://huggingface.co/neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC)
|
| 190 |
+
|
| 191 |
+
**Architecture:** Llama3 CausalLM
|
| 192 |
+
|
| 193 |
+
**Task:** Abstractive summaries generation
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
## How to Get Started with the Adapter
|
| 197 |
+
|
| 198 |
+
This adapter must be used for lithuanian abstractive sumamries generation using Hugging Face `transformers` and `peft` libraries.
|
| 199 |
+
|
| 200 |
+
### Environment Setup
|
| 201 |
+
|
| 202 |
+
Installing required Python libraries. Used: ***Python 3.12.12***
|
| 203 |
+
|
| 204 |
+
```
|
| 205 |
+
pip install -r requirements.txt
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
### Code Snippet
|
| 210 |
+
|
| 211 |
+
```python
|
| 212 |
+
import torch
|
| 213 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 214 |
+
from peft import PeftModel
|
| 215 |
+
|
| 216 |
+
MODEL_ID = "neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC"
|
| 217 |
+
LORA_ADAPTER = "CARD-AI/BLKT-Llama3-1B-32k-LoRA-Adapter"
|
| 218 |
+
MAX_NEW_TOKENS = 200
|
| 219 |
+
|
| 220 |
+
tekstas = "Jūsų tekstas santraukos generavimui"
|
| 221 |
+
|
| 222 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID,use_fast=True)
|
| 223 |
+
if tokenizer.pad_token is None:
|
| 224 |
+
tokenizer.pad_token = tokenizer.eos_token
|
| 225 |
+
tokenizer.padding_side = "left"
|
| 226 |
+
|
| 227 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 228 |
+
MODEL_ID,
|
| 229 |
+
torch_dtype=torch.bfloat16,
|
| 230 |
+
device_map={"":0},
|
| 231 |
+
attn_implementation="sdpa"
|
| 232 |
+
)
|
| 233 |
+
|
| 234 |
+
model = PeftModel.from_pretrained(
|
| 235 |
+
base_model,
|
| 236 |
+
LORA_ADAPTER,
|
| 237 |
+
is_trainable=False
|
| 238 |
+
)
|
| 239 |
+
|
| 240 |
+
model.eval()
|
| 241 |
+
|
| 242 |
+
prompt = (
|
| 243 |
+
f"<|im_start|>Teksto pradžia:\n{tekstas}<|im_end|>\n"
|
| 244 |
+
f"<|im_start|>Santraukos pradžia:\n"
|
| 245 |
+
)
|
| 246 |
+
|
| 247 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 248 |
+
inputs.pop("token_type_ids", None)
|
| 249 |
+
|
| 250 |
+
end_tokens = ["<|im_end|>"]
|
| 251 |
+
eos_ids = tokenizer(end_tokens, add_special_tokens=False).input_ids
|
| 252 |
+
eos_ids = [ids[0] for ids in eos_ids if len(ids) == 1]
|
| 253 |
+
|
| 254 |
+
with torch.no_grad():
|
| 255 |
+
outputs = model.generate(
|
| 256 |
+
**inputs,
|
| 257 |
+
max_new_tokens=MAX_NEW_TOKENS,
|
| 258 |
+
do_sample=False,
|
| 259 |
+
repetition_penalty=2.5,
|
| 260 |
+
eos_token_id = eos_ids,
|
| 261 |
+
pad_token_id = tokenizer.pad_token_id,
|
| 262 |
+
num_beams = 2,
|
| 263 |
+
early_stopping=True
|
| 264 |
+
)
|
| 265 |
+
|
| 266 |
+
generated = tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):], skip_special_tokens=True).strip()
|
| 267 |
+
print(generated)
|
| 268 |
+
```
|
| 269 |
+
|
| 270 |
+
### Support of `Flash-Attention`
|
| 271 |
+
|
| 272 |
+
Model supports `flash_attention_2`, in order to use it, you need to install additional dependancies.
|
| 273 |
+
|
| 274 |
+
`Python 3.12`
|
| 275 |
+
|
| 276 |
+
```
|
| 277 |
+
pip install flash-attn==2.7.4.post1 --no-build-isolation
|
| 278 |
+
```
|
| 279 |
+
|
| 280 |
+
`Python 3.13`
|
| 281 |
+
|
| 282 |
+
```
|
| 283 |
+
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp313-cp313-linux_x86_64.whl
|
| 284 |
+
```
|
| 285 |
+
|
| 286 |
+
After installing dependancies update the base model loading script
|
| 287 |
+
|
| 288 |
+
```python
|
| 289 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 290 |
+
MODEL_ID,
|
| 291 |
+
torch_dtype=torch.bfloat16,
|
| 292 |
+
device_map={"":0},
|
| 293 |
+
attn_implementation="flash_attention_2"
|
| 294 |
+
)
|
| 295 |
+
```
|
| 296 |
+
|
| 297 |
+
## Uses
|
| 298 |
+
|
| 299 |
+
- Abstract summary generation from Lithuanian texts
|
| 300 |
+
- Applications: Law, Healthcare, Information Technolagy, and News topics
|
| 301 |
+
|
| 302 |
+
## Training Details
|
| 303 |
+
|
| 304 |
+
Dataset used in training: [Tekstyno nuoroda]()
|
| 305 |
+
|
| 306 |
+
### Training Configuration
|
| 307 |
+
|
| 308 |
+
```yml
|
| 309 |
+
lora_settings:
|
| 310 |
+
r: 64
|
| 311 |
+
lora_alpha: 128
|
| 312 |
+
target_modules: ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
|
| 313 |
+
lora_dropout: 0.05
|
| 314 |
+
task_type: "CAUSAL_LM"
|
| 315 |
+
use_rslora: True
|
| 316 |
+
training:
|
| 317 |
+
per_device_train_batch_size: 4
|
| 318 |
+
gradient_accumulation_steps: 16
|
| 319 |
+
bf16: True
|
| 320 |
+
learning_rate: 6e-5
|
| 321 |
+
warmup_ratio: 0.063
|
| 322 |
+
weight_decay: 0.053
|
| 323 |
+
num_train_epochs: 4
|
| 324 |
+
lr_scheduler_type: "cosine"
|
| 325 |
+
optim: "adafactor"
|
| 326 |
+
adam_epsilon: 1e-6
|
| 327 |
+
max_grad_norm: 1.0
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
**Environment:** Hugging Face Transformers (v4.54.1)
|
| 331 |
+
**Hardware:** 1× NVIDIA RTX A6000 ADA
|
| 332 |
+
|
| 333 |
+
## Evaluation
|
| 334 |
+
|
| 335 |
+
| Rouge-1 | Rouge-2 | Rouge-L | BertScore Precision | BertScore Recall | BertScore F1 | BLEU |
|
| 336 |
+
| :------------- | :------------- | :------------- | :---------- | :---- | :---- | :---- |
|
| 337 |
+
| 0.3230 | 0.1377 | 0.2135 | 0.8786 | 0.8683 | 0.8732 | 10.2290 |
|
| 338 |
+
|
| 339 |
+
## Citation
|
| 340 |
+
|
| 341 |
+
## License
|
adapter_config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "neurotechnology/BLKT-Llama3-1B-32k-CausalLM-Stage5-RC",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 128,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"megatron_config": null,
|
| 23 |
+
"megatron_core": "megatron.core",
|
| 24 |
+
"modules_to_save": null,
|
| 25 |
+
"peft_type": "LORA",
|
| 26 |
+
"peft_version": "0.18.1",
|
| 27 |
+
"qalora_group_size": 16,
|
| 28 |
+
"r": 64,
|
| 29 |
+
"rank_pattern": {},
|
| 30 |
+
"revision": null,
|
| 31 |
+
"target_modules": [
|
| 32 |
+
"q_proj",
|
| 33 |
+
"v_proj",
|
| 34 |
+
"up_proj",
|
| 35 |
+
"o_proj",
|
| 36 |
+
"gate_proj",
|
| 37 |
+
"down_proj",
|
| 38 |
+
"k_proj"
|
| 39 |
+
],
|
| 40 |
+
"target_parameters": null,
|
| 41 |
+
"task_type": "CAUSAL_LM",
|
| 42 |
+
"trainable_token_indices": null,
|
| 43 |
+
"use_dora": false,
|
| 44 |
+
"use_qalora": false,
|
| 45 |
+
"use_rslora": true
|
| 46 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6a55e92181c48d4872af48cd66e69c2a087a32e82dfc4839fa1e0be4d22adcf
|
| 3 |
+
size 134
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch==2.11.0
|
| 2 |
+
transformers==5.3.0
|
| 3 |
+
peft==0.18.1
|