RajuKandasamy
commited on
Commit
•
ba9e6a8
1
Parent(s):
2c41884
Update README.md
Browse files
README.md
CHANGED
@@ -1,27 +1,82 @@
|
|
1 |
---
|
2 |
license: cc-by-nc-3.0
|
3 |
datasets:
|
4 |
-
- roneneldan/
|
5 |
language:
|
6 |
- ta
|
7 |
- en
|
8 |
library_name: transformers
|
9 |
inference:
|
10 |
parameters:
|
11 |
-
max_new_tokens
|
12 |
-
repetition_penalty
|
13 |
temperature: 0.01
|
14 |
widget:
|
15 |
-
- text:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
example_title:
|
25 |
-
- text:
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-nc-3.0
|
3 |
datasets:
|
4 |
+
- roneneldan/TinyStoriesInstruct
|
5 |
language:
|
6 |
- ta
|
7 |
- en
|
8 |
library_name: transformers
|
9 |
inference:
|
10 |
parameters:
|
11 |
+
max_new_tokens: 120
|
12 |
+
repetition_penalty: 1.4
|
13 |
temperature: 0.01
|
14 |
widget:
|
15 |
+
- text: |
|
16 |
+
சொற்கள்:
|
17 |
+
வீழ்ச்சி, சீட்டு, பிடிவாதம்
|
18 |
+
சுருக்கம்:
|
19 |
+
example_title: Tamil Story with words 1
|
20 |
+
- text: |
|
21 |
+
சொற்கள்:
|
22 |
+
ஓட்டம், பயணம், குழப்பம்
|
23 |
+
சுருக்கம்:
|
24 |
+
example_title: Tamil Story with words 2
|
25 |
+
- text: |
|
26 |
+
சொற்கள்:
|
27 |
+
உதவி, பதிவு, சங்கடம்
|
28 |
+
சுருக்கம்:
|
29 |
+
example_title: Tamil Story with words 3
|
30 |
+
- text: |
|
31 |
+
சொற்கள்:
|
32 |
+
வாக்குறுதி, எலி, பெரியது
|
33 |
+
சுருக்கம்:
|
34 |
+
example_title: Tamil Story with words 4
|
35 |
+
- text: |
|
36 |
+
சொற்கள்:
|
37 |
+
திரும்பு, வாசனை திரவியம், துணிச்சல்
|
38 |
+
சுருக்கம்:
|
39 |
+
example_title: Tamil Story with words 5
|
40 |
+
- text: |
|
41 |
+
Words: prevent, car, broken
|
42 |
+
Features: Dialogue, Twist
|
43 |
+
example_title: Story in English
|
44 |
---
|
45 |
+
|
46 |
+
## Tamillama_Tiny: A 30M tiny llama model trained to tell stories in Tamil
|
47 |
+
### TL;DR:
|
48 |
+
|
49 |
+
This is an experimental model inspired by the paper https://arxiv.org/abs/2305.07759 - How Small Can Language Models Be and Still Speak Coherent English?.
|
50 |
+
|
51 |
+
Extended the same concept for Tamil. A 30M parameter LLaMA architecture model that outputs coherent Tamil is preseted here.
|
52 |
+
|
53 |
+
Additional experimentation which is included in the model:
|
54 |
+
1. This is a multilanguage model as it can output both English and Tamil stories.
|
55 |
+
2. The model also does translation of stories from Engish to tamil and vice versa. To see the translation feature, set the max_new_tokens > 512.
|
56 |
+
3. Translation of original stories from the tinystories dataset was done using [IndicTrans](https://ai4bharat.iitm.ac.in/indic-trans)
|
57 |
+
|
58 |
+
For now, this is a toy model for researchers, students and LLM enthusiasts to play with the linquistic capability of the model.
|
59 |
+
|
60 |
+
## Weights Release, License and Usage
|
61 |
+
We release the weights in two formats: Hugging Face transformers format and GGML format to use with CTransformers or LLaMA.cpp.
|
62 |
+
|
63 |
+
This is not fit for any practical purpose other than for research/experimentation use cases.
|
64 |
+
|
65 |
+
Usage:
|
66 |
+
```
|
67 |
+
python
|
68 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
69 |
+
|
70 |
+
tokenizer = AutoTokenizer.from_pretrained("RajuKandasamy/tamillama_tiny_30m")
|
71 |
+
model = AutoModelForCausalLM.from_pretrained("RajuKandasamy/tamillama_tiny_30m")""
|
72 |
+
prompt = f"""சொற்கள்:
|
73 |
+
வாக்குறுதி, எலி, பெரியது
|
74 |
+
சுருக்கம்:"""
|
75 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
76 |
+
|
77 |
+
generation_output = model.generate(
|
78 |
+
input_ids=input_ids, max_new_tokens=256
|
79 |
+
)
|
80 |
+
print(tokenizer.decode(generation_output[0]))
|
81 |
+
```
|
82 |
+
|