/ Модель

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

Контекст
2 048 токенов
Параметры
1 млрд
Лицензия
Apache 2.0
Архитектура
llama · dense
Опубликована
26 фев 2024

Qra-1b

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

Польскоязычная базовая модель на основе TinyLlama-1.1B для продолжения текста и моделирования польского языка.

1 643скачиваний за 30 дней20лайковвеса обновлены16 мар 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Qra-1b — польскоязычная базовая языковая модель, созданная в сотрудничестве Национального института обработки информации Польши (OPI) и Гданьского политехнического университета (PG). Модель основана на TinyLlama-1.1B: веса англоязычной модели дополнительно обучили на очищенном, отфильтрованном и дедуплицированном корпусе польских текстов объёмом около 90 млрд токенов. Это плотная авторегрессионная модель семейства Llama с примерно 1 млрд параметров; репозиторий содержит веса Safetensors, лицензия — Apache 2.0.

Модель предназначена для продолжения текста и моделирования польского языка, а также для оценки вероятности и перплексии польских текстов. В обучающем корпусе преобладали веб-материалы, включая CommonCrawl и MADLAD-400; при очистке оставляли тексты преимущественно на польском и английском. Указанный для опубликованной модели контекст — 2048 токенов.

Qra-1b является базовой языковой моделью, обученной предсказывать следующий токен, а не следовать инструкциям или вести диалог. Для чат-ботов и выполнения пользовательских инструкций требуется дополнительная настройка. Результаты перплексии напрямую сравнимы только между моделями с одинаковой токенизацией.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Qra is a series of LLMs adapted to the Polish language, resulting from a collaboration between the National Information Processing Institute (OPI) and Gdańsk University of Technology (PG). The models were trained on the infrastructure of PG TASK Computing Center using 21 Nvidia A100 cards. The published versions of the Qra models were initialized with the weights of English LLama 2 checkpoints and then further trained on a carefully cleaned, filtered, and deduplicated corpus of Polish texts, totaling about 90 billion tokens. The original corpus consisted primarily of web data, including CommonCrawl dumps, and the MADLAD-400 corpus.

⚠️ Important: Qra are foundation language models trained with causal language modeling objective on a large corpus of texts. They are therefore not intended for conversational or instruction-following purposes, and should be further fine-tuned to be used for such tasks. ⚠️

The preprocessing pipeline included the following steps:

  • Text normalization, removal of URLs.
  • Removal of documents shorter than 500 characters.
  • Cleaning sentences in documents using a set of heuristic rules. Among others, sentences consisting of mostly non-alphabetical characters, as well as sentences in languages other than Polish and English, were removed.
  • Filtering documents using a quality classifier trained on a set of several thousand documents manually labeled as being of high or low quality. The input to the classifier is a set of several statistics ("quality signals") such as the percentage of Polish words, average word and sentence length, number of word and character duplications, proportion of different characters classes in the text.
  • Filtering documents based on the perplexity value calculated by a lightweight KenLM language model.
  • Assigning the document to one of 18 topical domains using a trained classifier.
  • Fuzzy deduplication using the MinHash algorithm within each topical domain.

The final distribution of documents by topic is shown in the chart below:

Model details

The models were trained for one epoch on sequences of 4096 tokens. During training, we used many modern optimizations such as:

Below is a summary of the Qra-1B model:

AttributeValue
Adapted fromTinyLlama-1.1B
LicenseApache 2.0
Batch size1344
Context length4096
Learning rate2e-5
Learning rate decaycosine
Warmup steps0
Training time2 days

Evaluation

In this section we compare the perplexity of Qra models on Polish texts with other Polish and English LLMs.

Note that perplexity values between different text segmentations are not directly comparable. Therefore, we can draw conclusions based on comparisons only beetween models using the same tokenizer, such as Qra and the original LLama / TinyLLama.

PolEval-2018

In 2018, the PolEval competition included a language modeling task, for which training and test sets totaling over 20 million Polish sentences were made available. We used the first 10k sentences from the test set to evaluate modern neural language models. To calculate the perplexity, we used a script from the HuggingFace Evaluate library.

Long documents (2024)

Currently, LLMs support contexts of thousands of tokens. Their practical applications usually also involve processing long documents. Therefore, evaluating perplexity on a sentence-based dataset such as PolEval-2018 may not be meaningful. Additionally, the PolEval corpus has been publicly available on the internet for the past few years, which raises the possibility that for some models the training sets have been contaminated by this data. For this reason, we have prepared a new collection consisting of long papers published exclusively in 2024, which will allow us to more reliably test the perplexities of the models on new knowledge that was not available to them at the time of training. The corpus consists of 5,000 documents ranging from several hundred to about 20,000 tokens. Half of the set consists of press texts from Polish news portals from February 2024, the other half are scientific articles published since January 2024. Most of the documents exceed the context size of the evaluated models. To calculate perplexity for these documents, we divided them into chunks of size equal to the model's context length with a stride of 512 tokens, following this example.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
a273489

0 моделей