/ Модель

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

Лицензия
Своя лицензия
Опубликована
26 окт 2023

vietnamese-llama2-7b-40GB

Генерация текстаТекст → текст

Продолжительно предобученная версия Llama 2 Chat 7B с улучшенным токенизатором для генерации вьетнамского и английского текста.

0скачиваний за 30 дней47лайковвеса обновлены5 мар 2024

Бенчмарки

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

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

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

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

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

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

Модель bkai-foundation-models/vietnamese-llama2-7b-40GB — языковая модель на основе Llama 2 Chat 7B, разработанная BKAI Foundation Models. Авторы продолжили предварительное обучение модели на смешанном корпусе объёмом 40,5 ГБ, преимущественно на вьетнамских текстах, и заменили токенизатор на SentencePiece с объединённым словарём Llama 2 и вьетнамской частью размером 20 тысяч токенов. По описанию авторов, новый токенизатор заметно эффективнее кодирует вьетнамский текст.

Модель предназначена для генерации текста на вьетнамском и английском языках; обучающие данные включают новости, книги, Википедию, правовые документы и веб-тексты. Чекпойнт требует дополнительного supervised fine-tuning (SFT), прежде чем его можно применять как готового чат-ассистента. В репозитории также предоставляется LoRA-часть для интеграции с исходной Llama 2 Chat 7B. Лицензия указана как other; при использовании необходимо соблюдать лицензионное соглашение Llama 2 и требования к сторонним компонентам. Авторы не гарантируют точность генераций.

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

  • генерация текста на вьетнамском языке
  • продолжение и дополнение вьетнамских текстов
  • генерация английского текста
  • адаптация базовой Llama 2 к вьетнамским корпусам
  • дальнейшее дообучение чат-модели на вьетнамских данных

Ограничения

Для практического использования в роли чат-ассистента модель требует дополнительного SFT. Авторы не гарантируют точность и надёжность сгенерированного содержания; при использовании нужно соблюдать условия лицензии Llama 2 и местное законодательство.

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

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

Открыть на Hugging Face

We employed SentencePiece to retrain a Vietnamese tokenizer with a vocabulary size of 20K. No Vietnamese word segmentation was used. We then merged this vocabulary with the original one of Llama2, removing duplicate tokens. The new tokenizer significantly improves when encoding Vietnamese text, reducing the number of tokens by 50% compared to ChatGPT and approximately 70% compared to the original Llama2.

We conducted a single-epoch continual pretraining, also known as incremental pretraining, using the Llama2-chat 7B model on a mixed dataset totaling 40.5 GB, comprised of:

  • 19 GB NewsCorpus
  • 1.1 GB Vietnamese Wikipedia
  • 1.6 GB Vietnamese books
  • 4.5 GB Vietnamese legal documents (crawled from thuvienphapluat and processed by ourselves)
  • 2.1 GB Vietnamese legal text (from C4-vi)
  • 1.1 GB English Books (sub-sampled from pg19)
  • 1.1 GB English Wikipedia (sub-sampled from 20220301.en wikipedia)
  • 10 GB English Text (sub-sampled from C4-en)

We trained the model on a DGX A100 system, utilizing four GPU A100 in 10 days (about 1000 GPU hours).

Hyperparameters are set as follows:

  • Training Regime: BFloat16 mixed precision

  • Lora Config:

    {
      "base_model_name_or_path": "meta-llama/Llama-2-7b-chat-hf",
      "bias": "none",
      "enable_lora": null,
      "fan_in_fan_out": false,
      "inference_mode": true,
      "lora_alpha": 32.0,
      "lora_dropout": 0.05,
      "merge_weights": false,
      "modules_to_save": [
        "embed_tokens",
        "lm_head"
      ],
      "peft_type": "LORA",
      "r": 8,
      "target_modules": [
        "q_proj",
        "v_proj",
        "k_proj",
        "o_proj",
        "gate_proj",
        "down_proj",
        "up_proj"
      ],
      "task_type": "CAUSAL_LM"
    }
    
    

We also provide the LoRA part so that you can integrate it with the original Llama2-chat-7b by yourself.

Please note that this model requires further supervised fine-tuning (SFT) to be used in practice!

Usage and other considerations: We refer to the Llama 2

Training loss:

Disclaimer

This project is built upon Meta's Llama-2 model. It is essential to strictly adhere to the open-source license agreement of Llama-2 when using this model. If you incorporate third-party code, please ensure compliance with the relevant open-source license agreements. It's important to note that the content generated by the model may be influenced by various factors, such as calculation methods, random elements, and potential inaccuracies in quantification. Consequently, this project does not offer any guarantees regarding the accuracy of the model's outputs, and it disclaims any responsibility for consequences resulting from the use of the model's resources and its output. For those employing the models from this project for commercial purposes, developers must adhere to local laws and regulations to ensure the compliance of the model's output content. This project is not accountable for any products or services derived from such usage.

Acknowledgments

We extend our gratitude to PHPC - Phenikaa University and NVIDIA for their generous provision of computing resources for model training. Our appreciation also goes out to binhvq and the other authors for their diligent efforts in collecting and preparing the Vietnamese text corpus.

Please cite our manuscript if this dataset is used for your work

  @article{duc2024towards,
    title={Towards Comprehensive Vietnamese Retrieval-Augmented Generation and Large Language Models},
    author={Nguyen Quang Duc, Le Hai Son, Nguyen Duc Nhan, Nguyen Dich Nhat Minh, Le Thanh Huong, Dinh Viet Sang},
    journal={arXiv preprint arXiv:2403.01616},
    year={2024}
  }

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

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

GPU в ailist

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

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
860260f

0 моделей