/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
Llama 3
Архитектура
llama · dense
Базовая модель
Meta-Llama-3-8B
Опубликована
14 июл 2024

Egyptian-Arabic-Translator-Llama-3-8B

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

Дообученная на переводах модель Llama 3 для перевода с английского на египетский арабский.

15скачиваний за 30 дней8лайковвеса обновлены14 июл 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Egyptian Arabic Translator Llama-3 8B — дообученная модель Ahmed Samirio на базе Meta Llama 3 8B, предназначенная для перевода с английского на египетский арабский. Модель содержит 7,5 млрд параметров, использует плотную архитектуру LlamaForCausalLM и формат PyTorch; длина контекста — 8192 токена.

Модель подходит для перевода англоязычных инструкций и текстов, включая наборы данных для дообучения инструкциям и генерации текста. Она обучена на ahmedsamirio/oasst2-9k-translation; сведений о результатах оценки качества в карточке нет. Лицензия — Llama 3.

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

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

Ограничения

Карточка не приводит результатов оценки качества и указывает на экспериментальный характер попытки создать компактную модель перевода. Назначение описано прежде всего как перевод с английского на египетский арабский; качество для других языковых направлений и задач не подтверждено.

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

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

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

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

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

Открыть на Hugging Face

axolotl version: 0.4.1

base_model: meta-llama/Meta-Llama-3-8B
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer

load_in_8bit: true
load_in_4bit: false
strict: false

datasets:
  - path: translation-dataset-v3-train.hf
    type: alpaca
    train_on_split: train

test_datasets:
  - path: translation-dataset-v3-test.hf
    type: alpaca
    split: train

dataset_prepared_path: ./last_run_prepared
output_dir: ./llama_3_translator
hub_model_id: ahmedsamirio/llama_3_translator_v3


sequence_len: 2048
sample_packing: true
pad_to_sequence_len: true
eval_sample_packing: false

adapter: lora
lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
  - gate_proj
  - down_proj
  - up_proj
  - q_proj
  - v_proj
  - k_proj
  - o_proj

wandb_project: en_eg_translator
wandb_entity: ahmedsamirio
wandb_name: llama_3_en_eg_translator_v3

gradient_accumulation_steps: 4
micro_batch_size: 2
num_epochs: 2
optimizer: paged_adamw_32bit
lr_scheduler: cosine
learning_rate: 2e-5

train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false

gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true

warmup_steps: 10
evals_per_epoch: 10
eval_table_size:
eval_max_new_tokens: 128
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
  pad_token: <|end_of_text|>

Egyptian Arabic Translator Llama-3 8B

This model is a fine-tuned version of meta-llama/Meta-Llama-3-8B on the ahmedsamirio/oasst2-9k-translation dataset.

Model description

This model is an attempt to create a small translation model from English to Egyptian Arabic.

Intended uses & limitations

  • Translating instruction finetuning and text generation datasets

Inference code

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

tokenizer = AutoTokenizer.from_pretrained("ahmedsamirio/Egyptian-Arabic-Translator-Llama-3-8B")
model = AutoModelForCausalLM.from_pretrained("ahmedsamirio/Egyptian-Arabic-Translator-Llama-3-8B")
pipe = pipeline(task='text-generation', model=model, tokenizer=tokenizer)


en_template = """<|begin_of_text|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Translate the following text to English.

### Input:
{text}

### Response:
"""

ar_template = """<|begin_of_text|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Translate the following text to Arabic.

### Input:
{text}

### Response:
"""

eg_template = """<|begin_of_text|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Translate the following text to Egyptian Arabic.

### Input:
{text}

### Response:
"""

text = """Some habits are known as "keystone habits," and these influence the formation of other habits. \
For example, identifying as the type of person who takes care of their body and is in the habit of exercising regularly, \
can also influence eating better and using credit cards less. In business, \
safety can be a keystone habit that influences other habits that result in greater productivity.[17]"""

ar_text = pipe(ar_template.format(text=text), 
               max_new_tokens=256, 
               do_sample=True, 
               temperature=0.3, 
               top_p=0.5)


eg_text = pipe(eg_template.format(text=ar_text), 
               max_new_tokens=256, 
               do_sample=True, 
               temperature=0.3, 
               top_p=0.5)

print("Original Text:" text)
print("\nArabic Translation:", ar_text)
print("\nEgyptian Arabic Translation:", eg_text)

Training and evaluation data

ahmedsamirio/oasst2-9k-translation

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 2
  • eval_batch_size: 2
  • seed: 42
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 8
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_steps: 10
  • num_epochs: 2

Training results

Training LossEpochStepValidation Loss
0.96610.000811.3816
0.56110.10021230.9894
0.67390.20042460.8820
0.51680.30063690.8229
0.55820.40084920.7931
0.5520.50106150.7814
0.51290.60127380.7591
0.58870.70148610.7444
0.63590.80169840.7293
0.6130.901811070.7179
0.56711.002012300.7126
0.49561.084713530.7034
0.50551.184914760.6980
0.48631.285115990.6877
0.45381.385317220.6845
0.43621.485518450.6803
0.42911.585719680.6834
0.62081.685920910.6830
0.5821.786222140.6781
0.50011.886423370.6798

Framework versions

  • PEFT 0.11.1
  • Transformers 4.42.3
  • Pytorch 2.1.2+cu118
  • Datasets 2.19.1
  • Tokenizers 0.19.1

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей