/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
CC BY-NC 4.0
Архитектура
llama · dense
Опубликована
23 апр 2024

Jellyfish-8B

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

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

116скачиваний за 30 дней2лайкавеса обновлены15 сен 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Jellyfish-8B — языковая модель с 7,5 млрд параметров на архитектуре Llama, разработанная Хаочэнем Чжаном, Юяном Дуном, Чуанем Сяо и Масафуми Оямадой при поддержке NEC Corporation и Университета Осаки. Модель дообучена с помощью LoRA на базе Meta-Llama-3-8B-Instruct на части набора Jellyfish-Instruct и предназначена для работы с табличными данными на английском языке.

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

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Jellyfish-8B

Jellyfish models with other sizes are available here:
Jellyfish-7B
Jellyfish-13B

Model Details

Jellyfish-8B is a large language model equipped with 8 billion parameters.
We fine-tuned the Meta-Llama-3-8B-Instruct model using a subset of the Jellyfish-Instruct dataset.

More details about the model can be found in the Jellyfish paper.

  • Developed by: Haochen Zhang, Yuyang Dong, Chuan Xiao, Masafumi Oyamada
  • Contact: dongyuyang@nec.com
  • Funded by: NEC Corporation, Osaka University
  • Language(s) (NLP): English
  • License: Non-Commercial Creative Commons license (CC BY-NC-4.0)
  • Finetuned from model: Meta-Llama-3-8B-Instruct

Citation

If you find our work useful, please give us credit by citing:

@article{zhang2023jellyfish,
  title={Jellyfish: A Large Language Model for Data Preprocessing},
  author={Zhang, Haochen and Dong, Yuyang and Xiao, Chuan and Oyamada, Masafumi},
  journal={arXiv preprint arXiv:2312.01678},
  year={2023}
}

Performance on seen tasks

TaskTypeDatasetNon-LLM SoTA1GPT-3.52GPT-42GPT-4oTable-GPTJellyfish-7BJellyfish-8BJellyfish-13B
Error DetectionSeenAdult99.1099.1092.0183.58--77.4073.7499.33
Error DetectionSeenHospital94.4097.8090.7444.76--94.5193.4095.59
Error DetectionUnseenFlights81.00--83.4866.01--69.1566.2182.52
Error DetectionUnseenRayyan79.00--81.9568.53--75.0781.0690.65
Data ImputationSeenBuy96.5098.50100100--98.4698.46100
Data ImputationSeenRestaurant77.2088.4097.6790.70--89.5387.2189.53
Data ImputationUnseenFlipkart68.00--89.9483.20--87.1487.4881.68
Data ImputationUnseenPhone86.70--90.7986.78--86.5285.6887.21
Schema MatchingSeenMIMIC-III20.00--40.0029.41--53.3345.4540.00
Schema MatchingSeenSynthea38.5045.2066.676.56--55.5647.0656.00
Schema MatchingUnseenCMS50.00--19.3522.22--42.8638.1059.29
Entity MatchingSeenAmazon-Google75.5863.5074.2170.9170.1081.6981.4281.34
Entity MatchingSeenBeer94.3710010090.3296.30100.00100.0096.77
Entity MatchingSeenDBLP-ACM98.9996.6097.4495.8793.8098.6598.7798.98
Entity MatchingSeenDBLP-GoogleScholar95.7083.8091.8790.4592.4094.8895.0398.51
Entity MatchingSeenFodors-Zagats10010010093.62100100100100
Entity MatchingSeeniTunes-Amazon97.0698.2010098.1894.3096.3096.3098.11
Entity MatchingUnseenAbt-Buy89.33--92.7778.73--86.0688.8489.58
Entity MatchingUnseenWalmart-Amazon86.8987.0090.2779.1982.4084.9185.2489.42
Avg80.44-84.1772.58-82.7481.5586.02

For GPT-3.5 and GPT-4, we used the few-shot approach on all datasets. For Jellyfish models, the few-shot approach is disabled on seen datasets and enabled on unseen datasets.
Accuracy as the metric for data imputation and the F1 score for other tasks.

HoloDetect for Error Detection seen datasets
RAHA for Error Detection unseen datasets
IPM for Data Imputation SMAT for Schema Matching
Ditto for Entity Matching
3.
Large Language Models as Data Preprocessors

Performance on unseen tasks

Column Type Annotation

DatasetRoBERTa (159 shots)1GPT-3.51GPT-4GPT-4oJellyfish-7BJellyfish-8BJellyfish-13B
SOTAB79.2089.4791.5565.058376.3382

Few-shot is disabled for Jellyfish models.

  1. Results from Column Type Annotation using ChatGPT

Attribute Value Extraction

DatasetStable Beluga 2 70B1SOLAR 70B1GPT-3.51GPT-4 1GPT-4oJellyfish-7BJellyfish-8BJellyfish-13B
AE-110k52.1049.2061.3055.5055.7756.0959.5558.12
OA-Mine50.8055.2062.7068.9060.2051.9859.2255.96

Few-shot is disabled for Jellyfish models.

  1. Results from Product Attribute Value Extraction using Large Language Models

Prompt Template

<|start_header_id|>system<|end_header_id|>{system message}<|eot_id|>
<|start_header_id|>user<|end_header_id|>{prompt}<|eot_id|>
<|start_header_id|>assistant<|end_header_id|>

Training Details

Training Method

We used LoRA to speed up the training process, targeting the q_proj, k_proj, v_proj, and o_proj modules.

Uses

To accelerate the inference, we strongly recommend running Jellyfish using vLLM.

Python Script

We provide two simple Python code examples for inference using the Jellyfish model.

Using Transformers and Torch Modules

from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
import torch

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

# Model will be automatically downloaded from HuggingFace model hub if not cached.
# Model files will be cached in "~/.cache/huggingface/hub/models--NECOUDBFM--Jellyfish/" by default.
# You can also download the model manually and replace the model name with the path to the model files.
model = AutoModelForCausalLM.from_pretrained(
    "NECOUDBFM/Jellyfish",
    torch_dtype=torch.float16,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("NECOUDBFM/Jellyfish")

system_message = "You are an AI assistant that follows instruction extremely well. Help as much as you can."

# You need to define the user_message variable based on the task and the data you want to test on.
user_message = "Hello, world."

prompt = f"<|start_header_id|>system<|end_header_id|>{system message}<|eot_id|>\n<|start_header_id|>user<|end_header_id|>{user_message}<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>"
inputs = tokenizer(prompt, return_tensors="pt")
input_ids = inputs["input_ids"].to(device)

# You can modify the sampling parameters according to your needs.
generation_config = GenerationConfig(
    do_samples=True,
    temperature=0.35,
    top_p=0.9,
)

with torch.no_grad():
    generation_output = model.generate(
        input_ids=input_ids,
        generation_config=generation_config,
        return_dict_in_generate=True,
        output_scores=True,
        max_new_tokens=1024,
        pad_token_id=tokenizer.eos_token_id,
        repetition_penalty=1.15,
    )

output = generation_output[0]
response = tokenizer.decode(
    output[:, input_ids.shape[-1] :][0], skip_special_tokens=True
).strip()

print(response)

Using vLLM

from vllm import LLM, SamplingParams

# To use vllm for inference, you need to download the model files either using HuggingFace model hub or manually.
# You should modify the path to the model according to your local environment.
path_to_model = (
    "/workspace/models/Jellyfish"
)

model = LLM(model=path_to_model)

# You can modify the sampling parameters according to your needs.
# Caution: The stop parameter should not be changed.
sampling_params = SamplingParams(
    temperature=0.35,
    top_p=0.9,
    max_tokens=1024,
    stop=["<|eot_id|>"],
)

system_message = "You are an AI assistant that follows instruction extremely well. Help as much as you can."

# You need to define the user_message variable based on the task and the data you want to test on.
user_message = "Hello, world."

prompt = ff"<|start_header_id|>system<|end_header_id|>{system message}<|eot_id|>\n<|start_header_id|>user<|end_header_id|>{user_message}<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>"
outputs = model.generate(prompt, sampling_params)
response = outputs[0].outputs[0].text.strip()
print(response)

Prompts

We provide the prompts used for both fine-tuning and inference. You can structure your data according to these prompts.

System Message

You are an AI assistant that follows instruction extremely well.
User will give you a question. Your task is to answer as faithfully as you can.

For Error Detection

There are two forms of the error detection task. In the first form, a complete record row is provided, and the task is to determine if a specific value is erroneous. In the second form, only the value of a specific attribute is given, and the decision about its correctness is based solely on the attribute's name and value. The subsequent prompt examples pertain to these two forms, respectively.

Your task is to determine if there is an error in the value of a specific attribute within the whole record provided.
The attributes may include {attribute 1}, {attribute 2}, ...
Errors may include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense given the context of the whole record.
Record [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]
Attribute for Verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}? Choose your answer from: [Yes, No].
Your task is to determine if there is an error in the value of a specific attribute.
The attributes may belong to a {keyword} record and could be one of the following: {attribute 1}, {attribute 2}, ...
Errors can include, but are not limited to, spelling errors, inconsistencies, or values that don't make sense for that attribute.  
Note: Missing values (N/A or \"nan\") are not considered errors.
Attribute for Verification: [{attribute X}: {attribute X value}]
Question: Is there an error in the value of {attribute X}? Choose your answer from: [Yes, No].

For Data Imputation

You are presented with a {keyword} record that is missing a specific attribute: {attribute X}.
Your task is to deduce or infer the value of {attribute X} using the available information in the record.  
You may be provided with fields like {attribute 1}, {attribute 2}, ... to help you in the inference.  
Record: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Based on the provided record, what would you infer is the value for the missing attribute {attribute X}?  
Answer only the value of {attribute X}.

For Schema Matching

Your task is to determine if the two attributes (columns) are semantically equivalent in the context of merging two tables.
Each attribute will be provided by its name and a brief description.
Your goal is to assess if they refer to the same information based on these names and descriptions provided.
Attribute A is [name: {value of name}, description: {value of description}].
Attribute B is [name: {value of name}, description: {value of description}].
Are Attribute A and Attribute B semantically equivalent? Choose your answer from: [Yes, No].

For Entity Matching

You are tasked with determining whether two records listed below are the same based on the information provided.  
Carefully compare the {attribute 1}, {attribute 2}... for each record before making your decision.  
Note that missing values (N/A or \"nan\") should not be used as a basis for your decision.
Record A: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Record B: [{attribute 1}: {attribute 1 value}, {attribute 2}: {attribute 2 value}, ...]  
Are record A and record B the same entity? Choose your answer from: [Yes, No].  

For Column Type Annotation

We follow the prompt in Column Type Annotation using ChatGPT (text+inst+2-step).

For Attribute Value Extraction

We follow the prompt in Product Attribute Value Extraction using Large Language Models (textual, w/o examples).

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей