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
Model Card for Model ID
Model Details
Model Description
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.
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
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 Extra training data was taken from a private corpus of Faroese books ( Faroese Books)
Testing Data, Factors & Metrics
Testing Data
Validation/testing was performed on the test split of the Faroese books corpus ( Faroese Books)
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