File size: 3,267 Bytes
197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e eac75b0 197100e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
---
library_name: peft
base_model: AI-Sweden-Models/gpt-sw3-1.3b
datasets:
- barbaroo/Faroese_BLARK_small
- barbaroo/Books_Faroese
language:
- fo
- sv
- is
- da
- 'no'
- en
---
licence: [LICENCE](https://huggingface.co/AI-Sweden-Models/gpt-sw3-1.3b/blob/main/LICENSE)
# Model Card for Model ID
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** Barbara Scalvini, Language Technology Center, University of the Faroe Islands
- **Model type:** This is a LoRA adapter for GPT-Sw3 with continued pre-training on Faroese data (BLARK corpus, private Faroese books repository). Training was performed for 10 epochs (more checkpoints to come!).
- **Language(s) (NLP):** Swedish, English, Norwegian, Danish, Icelandic, Faroese
- **from model [optional]:** AI-Sweden-Models/gpt-sw3-1.3b
## How to Get Started with the Model
Use the code below to get started with the model.
```python
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the Peft configuration and model
config = PeftConfig.from_pretrained("barbaroo/gptsw3_lora_fo_1.3b")
model = AutoModelForCausalLM.from_pretrained("AI-Sweden-Models/gpt-sw3-1.3b")
model = PeftModel.from_pretrained(model, "barbaroo/gptsw3_lora_fo_1.3b")
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("AI-Sweden-Models/gpt-sw3-1.3b")
# Define the prompt
prompt = "fortel mær eina søgu:"
# Tokenize the input
inputs = tokenizer(prompt, return_tensors="pt")
# Generate text
output = model.generate(**inputs, max_length=100,do_sample=True, temperature=0.7)
# Decode the generated text
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
```
## Training Details
### Training Data
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --
[More Information Needed]
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
We trained our model on a corpus derived from the Basic Language Resource Kit for Faroese. For detailed information about the dataset, please see the [BLARK_small](https://huggingface.co/datasets/barbaroo/Faroese_BLARK_small)
Extra training data was taken from a private corpus of Faroese books ( [Faroese Books](https://huggingface.co/datasets/barbaroo/Books_Faroese))
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Data Card if possible. -->
Validation/testing was performed on the test split of the Faroese books corpus ( [Faroese Books](https://huggingface.co/datasets/barbaroo/Books_Faroese))
## Training procedure
The following `bitsandbytes` quantization config was used during training:
- quant_method: bitsandbytes
- load_in_8bit: True
- load_in_4bit: False
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: fp4
- bnb_4bit_use_double_quant: False
- bnb_4bit_compute_dtype: float32
### Framework versions
- PEFT 0.6.2.dev0
|