Ambari-7B-Instruct-v0.1 is an extension of the Ambari series, a bilingual English/Kannada model developed and released by
Cognitivelab.in. This model is specialized for natural language understanding tasks, particularly in the context of instructional pairs. It is built upon the Ambari-7B-Base-v0.1 model, utilizing a fine-tuning process with a curated dataset of translated instructional pairs.
The v0.2 version was finetune on the same dataset with all the same parameters but we didnt perform vocabular expansion, it is using the default tokenizer and was trained inorder to evaluate both the models side by side.
1# Usage
2import torch
3from transformers import LlamaTokenizer, LlamaForCausalLM
4
5model = LlamaForCausalLM.from_pretrained('Cognitive-Lab/Ambari-7B-Instruct-v0.2')
6tokenizer = LlamaTokenizer.from_pretrained('Cognitive-Lab/Ambari-7B-Instruct-v0.2')
7
8prompt = "Give me 10 Study tips in Kannada."
9inputs = tokenizer(prompt, return_tensors="pt")
10
11# Generate
12generate_ids = model.generate(inputs.input_ids, max_length=1000)
13decoded_output = tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
14
15print(decoded_output)
Read more about Ambari-7B-Instruct-v0.1 and its applications in natural language understanding tasks on the
Cognitivelab.in blog.
The model is fine-tuned using the Kannada Instruct Dataset, a collection of translated instructional pairs. The dataset includes English instruction and output pairs, as well as their corresponding translations in Kannada. The intentional diversification of the dataset, encompassing various language combinations, enhances the model's proficiency in cross-lingual tasks.
The model underwent a pivotal stage of supervised fine-tuning with low-rank adaptation, focusing on bilingual instruct fine-tuning. This approach involved training the model to respond adeptly in either English or Kannada based on the language specified in the user prompt or instruction.