/ Модель

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

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

SeaLLM-7B-v1

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

SeaLLM-7B-v1 — чат-модель на базе Llama для генерации текста на языках Юго-Восточной Азии.

186скачиваний за 30 дней24лайкавеса обновлены15 апр 2024

Бенчмарки

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

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

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

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

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

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

SeaLLM-7B-v1 — первая версия семейства SeaLLMs, языковая модель на архитектуре Llama с 7 млрд параметров, разработанная для работы с языками Юго-Восточной Азии. Она предназначена для диалогов и генерации текста; для запуска подходит кодовая база Llama 2, а запросы следует оформлять в формате инструкций, предусмотренном для чат-модели. README сообщает о поддержке вьетнамского, индонезийского, тайского, малайского, кхмерского, лаосского, тагальского и бирманского языков; английский и китайский также присутствуют в тегах метаданных.

Модель выпущена в формате safetensors. Авторы отмечают, что SeaLLM-7B-v1 заметно уступает SeaLLM-7B-v2 и рекомендуют использовать более новую версию. При генерации возможны неточные, вводящие в заблуждение или вредоносные ответы. Использование весов, кода и демо регулируется условиями SeaLLMs Terms Of Use.

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

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

Ограничения

Авторы считают SeaLLM-7B-v1 значительно слабее SeaLLM-7B-v2 и рекомендуют перейти на v2. Ответы могут быть неточными, вводящими в заблуждение или вредоносными; перед развёртыванием рекомендуется проверка безопасности.

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

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

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

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

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

Открыть на Hugging Face

SeaLLMs - Large Language Models for Southeast Asia

UPDATE: SeaLLM-7B-v2.5 is released with state-of-the-art performance in world knowledge and reasoning.

IMPORTANT: SeaLLM-7B-v2 is released with state-of-the-art performance, and this Llama-based SeaLLM-7B-v1 is DEPRECATED. Please use SeaLLM-7B-v2 instead.

SeaLLM-7B-v1

This a 1st version of 7B SeaLLMs. It Vietnamese 🇻🇳, Indonesian 🇮🇩, Thai 🇹🇭, Malay 🇲🇾, Khmer 🇰🇭, Lao 🇱🇦, Tagalog 🇵🇭 and Burmese 🇲🇲. It have much lower capability than SeaLLM-7B-v2, so please use the SeaLLM-7B-v2 instead.

Visit our Technical Report and 🤗 Tech Memo for more details.

Disclaimer: We must note that even though the weights, codes, and demos are released in an open manner, similar to other pre-trained language models, and despite our best efforts in red teaming and safety fine-tuning and enforcement, our models come with potential risks, including but not limited to inaccurate, misleading or potentially harmful generation. Developers and stakeholders should perform their own red teaming and provide related security measures before deployment, and they must abide by and comply with local governance and regulations. In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights, codes, or demos.

The logo was generated by DALL-E 3.

How to Run:

SeaLLM models work the same way as Llama-2, so the Llama-2 generation codebase should be sufficient to run. However, as this is a chat model, you should wrap the prompt/instruction using the following format function.

You should also turn off add_special_tokens with tokenizer.add_special_tokens = False.


BOS_TOKEN = '<s>'
EOS_TOKEN = '</s>'

B_INST, E_INST = "[INST]", "[/INST]"
B_SYS, E_SYS = "<<SYS>>\n", "\n<</SYS>>\n\n"

SYSTEM_PROMPT = """You are a multilingual, helpful, respectful and honest assistant. \
Please always answer as helpfully as possible, while being safe. Your \
answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure \
that your responses are socially unbiased and positive in nature.

If a question does not make any sense, or is not factually coherent, explain why instead of answering something not \
correct. If you don't know the answer to a question, please don't share false information.

As a multilingual assistant, you must respond and follow instructions in the native language of the user by default, unless told otherwise. \
Your response should adapt to the norms and customs of the respective language and culture.
"""


def chat_multiturn_seq_format(
    message: str,
    history: List[Tuple[str, str]] = None, 
):
    """
    ```
        <bos>[INST] B_SYS SytemPrompt E_SYS Prompt [/INST] Answer <eos>
        <bos>[INST] Prompt [/INST] Answer <eos>
        <bos>[INST] Prompt [/INST]
    ```
    As the format auto-add <bos>, please turn off add_special_tokens with `tokenizer.add_special_tokens = False`
    Inputs:
      message: the current prompt
      history: list of list indicating previous conversation. [[message1, response1], [message2, response2]]
    Outputs:
      full_prompt: the prompt that should go into the chat model

    e.g:
      full_prompt = chat_multiturn_seq_format("Hello world")
      output = model.generate(tokenizer.encode(full_prompt, add_special_tokens=False), ...)
    """
    text = ''
    for i, (prompt, res) in enumerate(history):
        if i == 0:
            text += f"{bos_token}{B_INST} {B_SYS} {sys_prompt} {E_SYS} {prompt} {E_INST}"
        else:
            text += f"{bos_token}{B_INST} {prompt}{end_instr}"
        if res is not None:
            text += f" {res} {eos_token} "
    if len(history) == 0 or text.strip() == '':
        text = f"{bos_token}{B_INST} {B_SYS} {sys_prompt} {E_SYS} {message} {E_INST}"
    else:
        text += f"{bos_token}{B_INST} {message} {E_INST}"
    return text


Citation

If you find our project useful, we hope you would kindly star our repo and cite our work as follows: Corresponding Author: l.bing@alibaba-inc.com

@article{damonlpsg2023seallm,
  author = {Xuan-Phi Nguyen*, Wenxuan Zhang*, Xin Li*, Mahani Aljunied*,
            Qingyu Tan, Liying Cheng, Guanzheng Chen, Yue Deng, Sen Yang,
            Chaoqun Liu, Hang Zhang, Lidong Bing},
  title = {SeaLLMs - Large Language Models for Southeast Asia},
  year = 2023,
  Eprint = {arXiv:2312.00738},
}

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

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

GPU в ailist

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

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

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

Ревизия весов
6fceb64

0 моделей