/ Модель

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

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

jais-30b-v3

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

Jais-30b-v3 — двуязычная языковая модель на 30 млрд параметров для генерации текста на арабском и английском языках.

10скачиваний за 30 дней13лайковвеса обновлены11 сен 2024

Бенчмарки

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

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

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

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

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

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

Jais-30b-v3 — двуязычная предварительно обученная большая языковая модель, разработанная Core42 (Inception) совместно с Cerebras Systems. Она предназначена для генерации текста на арабском и английском языках, а также для дальнейшей адаптации под прикладные задачи, например чат-ассистентов и обслуживание клиентов.

Модель содержит 30 млрд параметров и обучена на 1,6 трлн токенов, включая арабские, английские и программные данные. Архитектура — декодерный Transformer с SwiGLU и позиционными представлениями ALiBi, помогающими работать с длинными последовательностями. Модель принимает текст и генерирует текст; для загрузки через Transformers требуется пользовательский класс модели и параметр trust_remote_code=True.

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

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

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

Ограничения

Модель оптимизирована для арабского и английского языков, поэтому качество на других языках и диалектах может быть ниже. Она может выдавать неверные, вводящие в заблуждение или предвзятые ответы и не предназначена для важных решений без человеческого контроля.

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

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

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

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

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

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

Открыть на Hugging Face

Jais-30b-v3

This is a 30 billion parameter pre-trained bilingual large language model for both Arabic and English. The model has been trained on a total of 1.6 trillion tokens, consisting of 971 billion tokens in English, 475 billion in Arabic, and 193 billion in code.

The present model is the successor to our previously released Jais-30b-v1 model. It employs a transformer-based decoder-only (GPT-3) architecture and incorporates the SwiGLU non-linearity. It implements ALiBi position embeddings, enabling the model to extrapolate to long sequence lengths, providing improved context handling and model precision.

Getting started

Below is sample code to use the model. Note that the model requires a custom model class, so users must enable trust_remote_code=True while loading the model. Also, note that this code is tested on transformers==4.37.2.

# -*- coding: utf-8 -*-

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_path = "core42/jais-30b-v3"

device = "cuda" if torch.cuda.is_available() else "cpu"

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", trust_remote_code=True)


def get_response(text, tokenizer=tokenizer, model=model):
    input_ids = tokenizer(text, return_tensors="pt").input_ids
    inputs = input_ids.to(device)
    input_len = inputs.shape[-1]
    generate_ids = model.generate(
        inputs,
        top_p=0.9,
        temperature=0.3,
        max_length=200,
        min_length=input_len + 4,
        repetition_penalty=1.2,
        do_sample=True,
    )
    response = tokenizer.batch_decode(
        generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True
    )[0]
    return response


text = "عاصمة دولة الإمارات العربية المتحدة ه"
print(get_response(text))

text = "The capital of UAE is"
print(get_response(text))

Model Details

Intended Use

We release the Jais 30B model under a full open source license. We welcome all feedback and opportunities to collaborate.

This is the third release after Jais-13b from Core42, and at the time of release, achieved state of the art across a comprehensive Arabic test suite as noted in the evaluation section. Some potential downstream uses include:

  • Research: This model can be used by researchers and developers.
  • Commercial Use: It can be used as a base model to further fine-tune for specific use cases (similar to jais-13b-chat). Some potential use cases include:
    • Chat-assistants.
    • Customer service.

Audiences that we hope will benefit from our model:

  • Academics: For those researching Arabic natural language processing.
  • Businesses: Companies targeting Arabic-speaking audiences.
  • Developers: Those integrating Arabic language capabilities in apps.

Out-of-Scope Use

While Jais-30b is a powerful Arabic and English bilingual model, it's essential to understand its limitations and the potential of misuse. It is prohibited to use the model in any manner that violates applicable laws or regulations. The following are some example scenarios where the model should not be used.

  • Malicious Use: The model should not be used for generating harmful, misleading, or inappropriate content. This includes but is not limited to:

    • Generating or promoting hate speech, violence, or discrimination.
    • Spreading misinformation or fake news.
    • Engaging in or promoting illegal activities.
  • Sensitive Information: The model should not be used to handle or generate personal, confidential, or sensitive information.

  • Generalization Across All Languages: Jais-30b is bilingual and optimized for Arabic and English, it should not be assumed to have equal proficiency in other languages or dialects.

  • High-Stakes Decisions: The model should not be used to make high-stakes decisions without human oversight. This includes medical, legal, financial, or safety-critical decisions.

Bias, Risks, and Limitations

The model is trained on publicly available data which was in part curated by Inception. We have employed different techniqes to reduce bias in the model. While efforts have been made to minimize biases, it is likely that the model, as with all LLM models, will exhibit some bias.

The model is trained as an AI assistant for Arabic and English speakers. The model is limited to produce responses for queries in these two languages and may not produce appropriate responses to other language queries.

By using Jais, you acknowledge and accept that, as with any large language model, it may generate incorrect, misleading and/or offensive information or content. The information is not intended as advice and should not be relied upon in any way, nor are we responsible for any of the content or consequences resulting from its use. We are continuously working to develop models with greater capabilities, and as such, welcome any feedback on the model.

Copyright Inception Institute of Artificial Intelligence Ltd. JAIS is made available under the Apache License, Version 2.0 (the “License”). You shall not use JAIS except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, JAIS is distributed on an AS IS basis, without warranties or conditions of any kind, either express or implied. Please see the terms of the License for the specific language permissions and limitations under the License.

Training Details

Training Data

For the pre-training of Jais-30b, we used a diverse bilingual corpus sourced from the Web and other sources. We also used publicly available English and code datasets. To collect Arabic data, we use multiple sources including web pages, wikipedia articles, news articles, Arabic books, and social network content. We augment the volume of Arabic data by translating English to Arabic using an in-house machine translation system. We restrict this to high quality English resources such as English Wikipedia and English books. Our data acquisition strategy is similar to as mentioned in Jais-13b.

Training Procedure

Training was performed on the Condor Galaxy 1 (CG-1) supercomputer platform.

Training Hyperparameters

HyperparameterValue
Precisionfp32
OptimizerAdamW
Learning rate0 to 0.012 (<= 69 steps)
0.012 to 0.0012 (< 89k steps)
0.003 to 0.0005 (<167k steps)
0.002 to 0.0005 (<260k steps)
Weight decay0.1
Batch size768
Steps260k

Evaluation

We conducted a comprehensive evaluation of Jais and benchmarked it against other leading base language models, focusing on both English and Arabic. The evaluation criteria spanned various dimensions, including:

  • Knowledge: How well the model answers factual questions.
  • Reasoning: The model's ability to answer questions requiring reasoning.
  • Misinformation/Bias: Assessment of the model's susceptibility to generating false or misleading information, and its neutrality.

Arabic evaluation results:

ModelsAvgEXAMSMMLU (M)LitQAHellaswagPIQABoolQASituatedQAARC-COpenBookQATruthfulQACrowS-Pairs
Jais-30b-v348.9435.260.660.46967.742.239.233.845.157.3
Jais-30b-v147.84030.858.360.17068.743.338.532.242.656.9
Jais (13B)46.540.430.058.357.767.662.642.535.832.441.158.4
acegpt-13b42.534.729.942.345.660.363.238.132.832.245.156.4
acegpt-7b42.435.42946.343.860.463.437.231.13245.355.4
BLOOM (7.1B)40.934.028.237.140.958.459.939.127.328.044.453.5
LLaMA (30B)38.827.928.532.63552.763.734.925.728.647.249.8
LLaMA2 (13B)38.129.228.432.034.352.963.836.424.330.045.549.9

English evaluation results:

ModelsAvgMMLURACEHellaswagPIQABoolQASituatedQAARC-COpenBookQAWinograndeTruthfulQACrowS-Pairs
Jais-30b-v358.842.340.379.180.580.949.348.443.270.640.372.3
Jais-30b-v156.234.539.875.179.574.349.945.941.268.436.573.3
Jais (13B)53.931.538.371.877.967.648.241.940.668.435.471.5
OPT-30b59.438.645.271.778.587.363.444.840.272.238.772.7
MPT-30b57.338.839.78080.873.945.649.243.271.138.369.3
Llama-30b55.43740.279.280.168.34445.34272.742.358.2
Falcon (40B)54.831.337.176.480.573.743.243.644.267.234.372.3

Citation

@misc{sengupta2023jais,
      title={Jais and Jais-chat: Arabic-Centric Foundation and Instruction-Tuned Open Generative Large Language Models}, 
      author={Neha Sengupta and Sunil Kumar Sahu and Bokang Jia and Satheesh Katipomu and Haonan Li and Fajri Koto and Osama Mohammed Afzal and Samta Kamboj and Onkar Pandit and Rahul Pal and Lalit Pradhan and Zain Muhammad Mujahid and Massa Baali and Alham Fikri Aji and Zhengzhong Liu and Andy Hock and Andrew Feldman and Jonathan Lee and Andrew Jackson and Preslav Nakov and Timothy Baldwin and Eric Xing},
      year={2023},
      eprint={2308.16149},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Copyright Inception Institute of Artificial Intelligence Ltd.

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

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

GPU в ailist

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

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

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

Ревизия весов
8ba907d

0 моделей