taidopurason commited on
Commit
e8c0dfd
·
verified ·
1 Parent(s): f049be0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - kv
4
+ - vro
5
+ - liv
6
+ base_model:
7
+ - tartuNLP/Llama-SMUGRI-7B
8
+ - meta-llama/Llama-2-7b-hf
9
+ ---
10
+
11
+ # Llama-SMUGRI-7B-Instruct-MTI
12
+ An instruction-tuned version of [tartuNLP/Llama-SMUGRI-7B](tartuNLP/Llama-SMUGRI-7B) base model continually pre-trained from [meta-llama/Llama-2-7b-hf](meta-llama/Llama-2-7b-hf)
13
+ to support Võro, Komi, and Livonian. The model additionally supports English, Estonian, Finnish, and Russian, however those languages were not the focus.
14
+
15
+ The instruction-tuning dataset consists of supporting instructions in Estonian, Finnish, English, and Russian,
16
+ and Alpaca-style instructions translated into Võro, Livonian, and Komi with [Neurotõlge](https://neurotolge.ee/).
17
+ See our [paper](https://arxiv.org/abs/2410.18902) for more details (model referenced as *Llama-SMUGRI-Instruct SupInst+TrAlpaca*).
18
+
19
+ ## Usage
20
+ We trained and evaluated our model with `transformers==4.36.2`.
21
+
22
+ Example usage:
23
+ ```
24
+ from transformers import pipeline
25
+ import torch
26
+
27
+ pipe = pipeline("text-generation", model="tartuNLP/Llama-SMUGRI-7B-Instruct-MTI", torch_dtype=torch.bfloat16, device_map="auto")
28
+
29
+ messages = [
30
+ {"role": "user", "content": "Kolm nõvvo, et terveq püssüq."},
31
+ ]
32
+
33
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
34
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.6, top_k=50, top_p=0.9)
35
+ print(outputs[0]["generated_text"][len(prompt):])
36
+ ```
37
+
38
+ ## Citation
39
+ ```
40
+ @misc{purason2024llmsextremelylowresourcefinnougric,
41
+ title={LLMs for Extremely Low-Resource Finno-Ugric Languages},
42
+ author={Taido Purason and Hele-Andra Kuulmets and Mark Fishel},
43
+ year={2024},
44
+ eprint={2410.18902},
45
+ archivePrefix={arXiv},
46
+ primaryClass={cs.CL},
47
+ url={https://arxiv.org/abs/2410.18902},
48
+ }
49
+ ```
50
+
51
+