/ Модель

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

Контекст
2 048 токенов
Параметры
39,8 млрд
Размер весов
60,7 ГБ
Лицензия
CC BY-NC 4.0
Архитектура
opt · dense
Библиотека
transformers
Опубликована
30 мар 2023

galpaca-30b

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

GALPACA 30B — дообученная на инструкциях Alpaca научная языковая модель для генерации ответов и помощи в решении задач.

124скачиваний за 30 дней55лайковвеса обновлены19 ноя 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GALPACA 30B — языковая модель Georgia Tech Research Institute на архитектуре OPT, полученная дообучением GALACTICA 30B на 52 тысячах инструкционных примеров Alpaca. Модель генерирует текст и следует инструкциям; её научная основа предназначена для ответов на научные вопросы, объяснения понятий и подготовки ответов с упоминанием публикаций, когда это возможно. Контекст составляет 2048 токенов.

Модель подходит для исследовательских экспериментов с генерацией научного текста и инструкционными языковыми моделями, а также для помощи в решении задач с кодом. Ответы могут содержать фактические ошибки, поэтому научные сведения требуют проверки. Модель распространяется по лицензии CC BY-NC 4.0 и дополнительно подпадает под условия использования OpenAI из-за происхождения набора Alpaca; коммерческое использование ограничено.

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

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

Ограничения

Модель может выдавать неточные научные сведения, поэтому ответы следует проверять; карточка предостерегает от производственного использования без мер защиты. Коммерческое использование ограничено лицензией CC BY-NC 4.0 и условиями OpenAI, применимыми к данным Alpaca.

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

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

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

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

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

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

Открыть на Hugging Face

GALPACA 30B (large)

GALACTICA 30B fine-tuned on the Alpaca dataset.

The model card from the original Galactica repo can be found here, and the original paper here.

The dataset card for Alpaca can be found here, and the project homepage here. The Alpaca dataset was collected with a modified version of the Self-Instruct Framework, and was built using OpenAI's text-davinci-003 model. As such it is subject to OpenAI's terms of service.

Model Details

The GALACTICA models are trained on a large-scale scientific corpus and are designed to perform scientific tasks. The Alpaca dataset is a set of 52k instruct-response pairs designed to enhace the instruction following capabilites of pre-trained language models.

Model Use

The GALACTICA model card specifies that the primary indended users of the GALACTICA models are researchers studying language models applied to the scientific domain, and it cautions against production use of GALACTICA without safeguards due to the potential for the model to produce inaccurate information. The original GALACTICA models are available under a non-commercial CC BY-NC 4.0 license, and the GALPACA model is additionally subject to the OpenAI Terms of Service.

Full Prompt:

Below is an instruction that describes a task. As a scientist, write a response that appropriately completes the request, citing specific papers whenever possible.

### Instruction:
Write out Maxwell's equations and explain each one.

### Markdown and LaTeX Response:

Response:

Maxwell's equations are a set of four equations that describe the behavior of electromagnetic fields. These equations are: $$\nabla \times \textbf{E} = -\frac{\partial \textbf{B}}{\partial t}$$ $$\nabla \times \textbf{B} = \mu_0 \epsilon_0 \frac{\partial \textbf{E}}{\partial t} + \mu_0 \textbf{J}$$ $$\nabla \bullet \textbf{E} = \frac{\rho}{\epsilon_0}$$ $$\nabla \bullet \textbf{B} = 0$$ The first two equations describe how the electric and magnetic fields, E and B, are related to each other. The third and fourth equations are Gauss's law for electric and magnetic fields, respectively. These equations describe the behavior of the electric and magnetic fields when there are charges and currents in the space. Each equation has a specific purpose and together they form a complete description of the behavior of electromagnetic fields.

Full Prompt:

Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Write a python function implements the Sherman-Morrison matrix inversion lemma using numpy.

### Response:
```python

Response:

def sm_inv_lemma(A, u, v):
  """ Function implementing the Sherman-Morrison matrix inversion lemma using numpy.
  
  Parameters
  ----------
  A : numpy array
      The original matrix.
  
  u : numpy array
      The first vector in the Sherman-Morrison lemma.
  
  v : numpy array
      The second vector in the Sherman-Morrison lemma.
  
  Returns
  -------
  The inverse matrix of A - uv^T.
  """
  A_inv = np.linalg.inv(A)
  alpha = 1 / (1 + v.T @ A_inv @ u)
  return A_inv - (alpha * A_inv @ u @ v.T @ A_inv)

Training Data

The GALPACA models are trained by fine-tuning pre-trained GALACTICA models on the Alpaca dataset. GALACTICA models were trained on 106 billion tokens of open-access scientific text and data, including papers, textbooks, scientific websites, encyclopedias, and more. Fine-tuning the base GALACTICA models on the 52k instruction-response pairs in the Alpaca dataset allows users to query the GALPACA models in an instruct-response fashion.

How to Use

The GALPACA weights are made available for use with the transformers library.

# pip install accelerate
from transformers import AutoTokenizer, OPTForCausalLM

tokenizer = AutoTokenizer.from_pretrained("GeorgiaTechResearchInstitute/galpaca-30b")
model = OPTForCausalLM.from_pretrained("GeorgiaTechResearchInstitute/galpaca-30b", device_map="auto", torch_dtype=torch.float16)

# see the original Alpaca repo for more information about the prompt templates
no_input_prompt_template = ("Below is an instruction that describes a task. "
                            "Write a response that appropriately completes the request.\n\n"
                            "### Instruction:\n{instruction}\n\n### Response:")
prompt = "Write out Maxwell's equations and explain the meaning of each one."
formatted_prompt = no_input_prompt_template.format_map({'instruction': prompt})

tokenized_prompt = tokenizer(formatted_prompt, return_tensors="pt").input_ids.to(model.device)
out_tokens = model.generate(tokenized_prompt)

print(tokenizer.batch_decode(out_tokens, skip_special_tokens=False, clean_up_tokenization_spaces=False))

Training Resources

GALPACA 30B was fine-tuned in about 6 hours using 16 A100 80GB GPUS, 16-bit mixed-precision, an effective batch-size of 1024, and with a maximum context window of 384 tokens. This model was trained using DeepSpeed ZeRO Stage 3 optimizations.

Performance and Limitations

Qualitative evaluation suggests that Galpaca frequently outperforms LLaMA-based Alpaca models on tasks related to technical knowledge and programming, while it underperforms on natural langauge tasks such as generating prose. More information about the performance and limitations of the GALACTICA family of models can be found on the original GALACTICA model card.

Works Cited

@inproceedings{GALACTICA,
    title={GALACTICA: A Large Language Model for Science},
    author={Ross Taylor and Marcin Kardas and Guillem Cucurull and Thomas Scialom and Anthony Hartshorn and Elvis Saravia and Andrew Poulton and Viktor Kerkez and Robert Stojnic},
    year={2022}
}
@misc{alpaca,
  author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
  title = {Stanford Alpaca: An Instruction-following LLaMA model},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
}

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.40.99
ARC (25-shot)49.57
HellaSwag (10-shot)58.2
MMLU (5-shot)43.78
TruthfulQA (0-shot)41.16
Winogrande (5-shot)62.51
GSM8K (5-shot)2.81
DROP (3-shot)28.89

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
OPTForCausalLM
Ревизия весов
901e7a1

0 моделей