/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
6,7 млрд
Размер весов
13,7 ГБ
Лицензия
Llama 2
Архитектура
llama · dense
Базовая модель
malayalam-llama-pt-v0
Опубликована
23 янв 2024

malayalam-llama-7b-instruct-v0.1

Генерация текстаТекст → текст5 профессий

Диалоговая модель LLaMA с 6,7 млрд параметров для генерации текста и ответов на инструкции на малаялам и английском языках.

167скачиваний за 30 дней14лайковвеса обновлены4 мар 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Malayalam LLaMA 7B Instruct v0.1 — диалоговая языковая модель Abhinand Balachandran для генерации текста и следования инструкциям на малаялам и английском языках. Это плотная архитектура LLaMA с 6,7 млрд параметров, дообученная на примерно 500 тысячах примеров с равной долей английских и малаяламских данных. В модель добавлен расширенный словарь малаяламского языка примерно на 16 тысяч токенов; контекст составляет 4096 токенов.

Модель подходит для диалогов, ответов на вопросы, создания текстов и дальнейшей адаптации под конкретные задачи обработки естественного языка. Карточка приводит результаты нескольких языковых и рассуждательных бенчмарков, но отмечает возможные расхождения между разными способами оценки. Модель не прошла фильтрацию вредного или оскорбительного содержания, поэтому её ответы требуют проверки. В README указана лицензия GNU GPL v3.0, тогда как метаданные Hugging Face помечают модель лицензией Llama 2.

Сценарии применения

  • диалоги на малаялам
  • ответы на вопросы на малаялам и английском
  • генерация текстов на малаялам
  • выполнение инструкций на английском языке
  • дообучение под задачи обработки малаяламского текста

Ограничения

Модель не прошла фильтрацию вредного или оскорбительного содержания; ответы следует проверять, особенно в публичных и чувствительных сценариях. Результаты бенчмарков могут различаться в зависимости от методики оценки.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Malayalam LLaMA 7B Instruct v0.1

Welcome to the inaugural release of the Malayalam LLaMA 7B instruct model – an important step in advancing LLMs for the Malayalam language. This model is ready for immediate inference and is also primed for further fine-tuning to cater to your specific NLP tasks.

To dive deep into the development and capabilities of this model, please read the research paper and the introductory blog post (WIP) that outlines our journey and the model's potential impact.

Note: This model is based on the Tamil LLaMA series of models. The GitHub repository remains the same - https://github.com/abhinand5/tamil-llama. The base models and the updated code for Tamil LLaMA v0.2 (which this work is based on) will be released soon.

If you appreciate this work and would like to support its continued development, consider buying me a coffee. Your support is invaluable and greatly appreciated.

"Buy Me A Coffee"

Demo:

To access an easy-to-use, no-code demo, please open the provided Google Colab notebook. Complete instructions for usage are included within the notebook itself.

Model description

The Malayalam LLaMA models have been enhanced and tailored specifically with an extensive Malayalam vocabulary of ~16,000 tokens, building upon the foundation set by the original LLaMA-2.

  • Model type: A 7B parameter GPT-like model finetuned on ~500,000 samples consisting of an equal proportion of English and Malayalam samples. (Dataset will be released soon)
  • Language(s): Bilingual. English and Malayalam.
  • License: GNU General Public License v3.0
  • Finetuned from model: To be released soon
  • Training Precision: bfloat16
  • Code: GitHub (To be updated soon)

Prompt Template: ChatML

<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

Benchmark Results

Benchmarking was done using LLM-Autoeval on an RTX 3090 on runpod.

Note: Please note that discrepancies have been observed between the Open LLM Leaderboard scores and those obtained from local runs using the LM Eval Harness with identical configurations. The results mentioned here are based on our own benchmarking. To replicate these findings, you can utilize the LLM-Autoeval or use lm-evaluation-harness locally with the configurations described in Open LLM Leaderboard's About page.

BenchmarkLlama 2 ChatTamil Llama v0.2 InstructTelugu Llama InstructMalayalam Llama Instruct
ARC Challenge (25-shot)52.953.7552.4752.82
TruthfulQA (0-shot)45.5747.2348.4747.46
Hellaswag (10-shot)78.5576.1176.1376.91
Winogrande (5-shot)71.7473.9571.7473.16
AGI Eval (0-shot)29.330.9528.4429.6
BigBench (0-shot)32.633.0832.9933.26
Average51.7852.5151.7152.2

Related Models

ModelTypeDataBase Model# ParamsDownload Links
Tamil LLaMA 7B v0.1 BaseBase model12GBLLaMA 7B7BHF Hub
Tamil LLaMA 13B v0.1 BaseBase model4GBLLaMA 13B13BHF Hub
Tamil LLaMA 7B v0.1 InstructInstruction following model145k instructionsTamil LLaMA 7B Base7BHF Hub
Tamil LLaMA 13B v0.1 InstructInstruction following model145k instructionsTamil LLaMA 13B Base13BHF Hub
Tamil LLaMA 7B v0.2 InstructInstruction/Chat model420k instructionsTamil LLaMA 7B Base v0.27BHF Hub
Telugu LLaMA 7B v0.2 InstructInstruction/Chat model~400k instructionsTelugu LLaMA 7B Base v0.17BHF Hub

Example Usage

from transformers import LlamaForCausalLM, AutoTokenizer, pipeline

model = LlamaForCausalLM.from_pretrained(
    "abhinand/malayalam-llama-instruct-v0.1",
    #load_in_8bit=True, # Set this depending on the GPU you have
    torch_dtype=torch.bfloat16,
    device_map={"": 0}, # Set this depending on the number of GPUs you have
    local_files_only=False # Optional
)
model.eval()

tokenizer = AutoTokenizer.from_pretrained("abhinand/malayalam-llama-instruct-v0.1")

inf_pipeline = pipeline("conversational", model=model, tokenizer=tokenizer)


def format_instruction(system_prompt, question, return_dict=False):
	if system_prompt is None:
		messages = [
			{'content': question, 'role': 'user'},
		]
	else:
		messages = [
			{'content': system_prompt, 'role': 'system'},
			{'content': question, 'role': 'user'},
		]

	if return_dict:
		return messages

	prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

	return prompt


# Set the generation configuration according to your needs
temperature = 0.6
repetition_penalty = 1.1
max_new_tokens = 256

SYSTEM_PROMPT = "You are an AI assistant who follows instructions extremely well. Do your best your best to help."
INPUT = "Give 3 tips to lead a healthy life"

instruction = format_instruction(
    system_prompt=SYSTEM_PROMPT,
    question=INPUT,
    return_dict=True,
)

output = inf_pipeline(
    instruction,
    temperature=temperature,
    max_new_tokens=max_new_tokens,
    repetition_penalty=repetition_penalty
)
print(output)

Example Output:

Conversation id: d57cdf33-01ff-4328-8efe-5c4fefdd6e77
system: You are an AI assistant who follows instructions extremely well. Do your best your best to help.
user: Give 3 tips to lead a healthy life
assistant: 1. Establish a regular sleep schedule: Aim for 7-9 hours of sleep per night, which is crucial for overall health and well-being.
2. Engage in physical activity regularly: Incorporate exercise into your daily routine, even if it's just a brisk walk or some light stretching. Regular physical activity can help reduce stress, improve mood, and maintain a healthy weight.
3. Eat a balanced diet: Consume a variety of whole grains, lean proteins, fruits, vegetables, and healthy fats. Limit processed foods, sugary drinks, and excessive amounts of sodium.

Usage Note

It's important to note that the models have not undergone detoxification/censorship. Therefore, while they possess impressive linguistic capabilities, there is a possibility for them to generate content that could be deemed harmful or offensive. We urge users to exercise discretion and supervise the model's outputs closely, especially in public or sensitive applications.

Meet the Developers

Get to know the creators behind this innovative model and follow their contributions to the field:

Citation

If you use this model or any of the the Tamil-Llama related work in your research, please cite:

@misc{balachandran2023tamilllama,
      title={Tamil-Llama: A New Tamil Language Model Based on Llama 2}, 
      author={Abhinand Balachandran},
      year={2023},
      eprint={2311.05845},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

We hope this model serves as a valuable tool in your NLP toolkit and look forward to seeing the advancements it will enable in the understanding and generation of the Tamil language.

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.39.69
AI2 Reasoning Challenge (25-Shot)37.20
HellaSwag (10-Shot)67.81
MMLU (5-Shot)23.12
TruthfulQA (0-shot)47.11
Winogrande (5-shot)62.90
GSM8k (5-shot)0.00

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
46d68c9

0 моделей