/ Модель

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

Лицензия
Apache 2.0
Библиотека
transformers
Опубликована
23 фев 2024

GemSUra-7B

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

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

0скачиваний за 30 дней8лайковвеса обновлены2 апр 2024

Бенчмарки

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

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

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

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

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

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

GemSUra-7B — языковая модель для генерации текста, созданная исследователями Университета технологий Хошимина и Стэнфордского университета. Модель получена дообучением Gemma 7B на вьетнамских текстах, включая Википедию и литературные материалы; для обучения использовалось предсказание следующего токена. Модель распространяется в формате Safetensors по лицензии Apache 2.0.

GemSUra-7B предназначена прежде всего для работы с вьетнамским языком, также заявлена поддержка английского. Её можно применять для ответов на вопросы с контекстом, суммаризации, классификации текста, перевода, генерации кода и рассуждений. В каталоге Hugging Face основная задача указана как text-generation; модель поддерживает диалоговый сценарий.

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

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

  • ответы на вопросы по предоставленному контексту
  • суммаризация вьетнамских статей
  • классификация вьетнамских текстов
  • перевод между вьетнамским и английским
  • генерация кода по текстовому запросу
  • диалоговое взаимодействие и языковое моделирование

Ограничения

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

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

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

Открыть на Hugging Face

GemSUra 7B

Model Details

Model Description

With a strong commitment to enhancing the quality of large language models for the Vietnamese language, a collaborative effort was undertaken by Vietnamese researchers hailing from Ho Chi Minh University of Technology (HCMUT) - Vietnam National University HCMC and Stanford University. Our endeavor involved the meticulous fine-tuning of various models using Vietnamese articles sourced from Wikipedia and other sources (if neccessary). In line with our dedication to fostering community progress, we are pleased to offer our models free of charge for research purposes. For those who wish to delve further into our research and its details, we encourage you to explore the comprehensive information provided below.

  • Developed by:
    • Duc Q. Nguyen
    • Sang T. Truong
    • Toan D. V. Nguyen
    • Dong D. Le
    • Nhi N. Truong
    • Tho Quan
    • Sanmi Koyejo
  • Funded by:
    • Microsoft Accelerating Foundation Models Research program
    • Stanford University
    • Ho Chi Minh University of Technology (HCMUT) - VNU-HCM
    • DSciLab (Faculty of Computer Science & Engineering, HCMUT - VNU-HCM)
  • Model type: Text generation
  • Languages: Vietnamese, English
  • License: Apache 2.0
  • Finetuned from model: Gemma 7B

Model Sources

We publicly provide starter source code for fine-tuning, evaluation adn deployment of our models.

  • Framework: ViLLM
  • Paper: Our paper was accepted at NAACL 2024. Link

Uses

Direct Use

You can use our models to perform various tasks containing

  • Question answering (with context)
  • Summarization
  • Language modelling
  • Text classification
  • Translation
  • Code generation
  • Reasoning

Downstream Use

This model can serve as an encoder for a wide range of downstream tasks, spanning from pure natural language processing to combinations of natural language processing with computer vision or speech processing.

Out-of-Scope Use

While our models have undergone fine-tuning using extensive Vietnamese datasets, they may not perform optimally in specialized domains necessitating profound domain expertise, such as medicine, politics, chemistry, etc. We kindly request that you refrain from employing our models for political purposes or any endeavors that may cause harm to individuals or compromise the sovereignty and territorial integrity of Vietnam.

Bias, Risks, and Limitations

Unless required by applicable law, the GemSUra materials and any output and results therefrom are provided on an "as is" basis, without warranties of any kind, either express or implied, including, without limitation, any warranties of title, non-infringement, merchantability, or fitness for a particular purpose. you are solely responsible for determining the appropriateness of using or redistributing the GemSUra materials and assume any risks associated with your use of the GemSUra materials and any output and results.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. In order for the model to work well, you may need perform prompt engineering to create appropriate prompts before inference.

How to Get Started with the Model

If you intend to use Ollama, please check this repo. Use the code below to get started with the model.

import transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

pipeline_kwargs={
	"temperature": 0.1,
	"max_new_tokens": 4096,
}
  
if __name__ == "__main__":
    # Load model
    model = AutoModelForCausalLM.from_pretrained(
        "ura-hcmut/GemSUra-7B",
        device_map="auto"
    )
    model.eval()

    # Load tokenizer
    tokenizer = AutoTokenizer.from_pretrained(
        "ura-hcmut/GemSUra-7B",
        trust_remote_code=True
    )
  
    pipeline = transformers.pipeline(
        model=model, 
        tokenizer=tokenizer,
        return_full_text=False,
        task='text-generation',
        **pipeline_kwargs
    )
  
    query_template = "<start_of_turn>user\n{query}<end_of_turn>\n<start_of_turn>model\n"
  
    while True:
        query = input("Query: ")
        if query == "exit":
            break
      
        query = query_template.format(query=query)
        answer = pipeline(query)[0]["generated_text"]
        print(answer)

Finetuning Details

Finetuning Data

List of datasets used for finetuning:

Finetuning Procedure

We utilize the causal language modelling (next token prediction) procedure to finetune our models. Available tutorial is available at https://huggingface.co/docs/transformers/tasks/language_modeling. Our framework is available at: https://github.com/martinakaduc/SUra-Factory

Finetuning Hyperparameters

  • Training regime: BFloat16 Mixed Precision
  • Lora rank: 256
  • Batch size: 1024
  • Optimizer: AdamW
  • Learning rate: 1e-5
  • Epochs: 2

Evaluation

Our models are tested with various tasks. The detail of evaluation process can be found at our Leaderboard.

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: 4 x A100 40GB
  • Hours used: 200h
  • Carbon Emitted: ~22 kg CO2 eq.

Citation

If you use GemSUra materials in your research, please cite our model(s) as below.

BibTeX:

@inproceedings{crossing2024,
    title = "Crossing Linguistic Horizons: Finetuning and Comprehensive Evaluation of Vietnamese Large Language Models",
    author = "Truong, Sang T.  and Nguyen, Duc Q.  and Nguyen, Toan D. V.  and Le, Dong D.  and Truong, Nhi N.  and Quan, Tho  and Koyejo, Sanmi",
    booktitle = "Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
    month = June,
    year = "2024",
    address = "Seattle, Washington",
    publisher = "Association for Computational Linguistics",
    url = "",
    pages = "",
}

Model Card Authors

Contact

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

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

GPU в ailist

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

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

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

Ревизия весов
b877100

0 моделей