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?.
Extended the same concept for Tamil. A 30M parameter LLaMA architecture model that outputs coherent Tamil is preseted here.
For now, this is a toy model for researchers, students and LLM enthusiasts to play with the linquistic capability of the model.
We release the weights in two formats: Hugging Face transformers format and GGML format to use with CTransformers or LLaMA.cpp.
This is not fit for any practical purpose other than for research/experimentation use cases.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("RajuKandasamy/tamillama_tiny_30m")
4model = AutoModelForCausalLM.from_pretrained("RajuKandasamy/tamillama_tiny_30m")
5prompt = f"""சொற்கள்:
6வாக்குறுதி, எலி, பெரியது
7சுருக்கம்:"""
8input_ids = tokenizer(prompt, return_tensors="pt").input_ids
9
10generation_output = model.generate(
11 input_ids=input_ids, max_new_tokens=256
12)
13print(tokenizer.decode(generation_output[0]))