/ Модель

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

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Библиотека
transformers
Опубликована
8 ноя 2023

question_answering

Ответы на вопросыТекст → текст7 профессий

Компактная англоязычная модель DistilBERT для поиска ответов на вопросы в предоставленном тексте.

64скачиваний за 30 дней7лайковвеса обновлены18 ноя 2023

Бенчмарки

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

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

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

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

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

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

Falconsai разработала дообученную модель на базе DistilBERT-base-uncased для ответов на вопросы по заданному контексту. Она использует архитектуру DistilBertForQuestionAnswering и принимает текст с вопросом и контекстом, чтобы определить ответ; контекст ограничен 512 токенами. Модель рассчитана на английский язык и подходит для сценариев, где важны компактность и быстрая обработка текста, например для поиска ответов в документах.

В README также упоминаются классификация текста, анализ тональности и распознавание именованных сущностей, но обучение этой версии было сосредоточено на ответах на вопросы. Качество на конкретных данных следует проверять отдельно: модель может хуже работать на отличающихся от обучения текстах и задачах. Распространяется по лицензии Apache-2.0.

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

  • поиск ответа на вопрос в статье или документе
  • извлечение фактов из контекста
  • создание англоязычного FAQ по документам

Ограничения

Качество может снижаться на данных и задачах, отличающихся от обучения; README рекомендует проверять модель на целевом наборе данных. Контекст ограничен 512 токенами.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card: Fine-tuned DistilBERT-base-uncased for Question and Answering

Model Description

Overview

The fine-tuned model presented here is an enhanced iteration of the DistilBERT-base-uncased model, meticulously trained on an updated dataset. Leveraging the underlying architecture of DistilBERT, a compact variant of BERT optimized for efficiency, this model is tailor-made for natural language processing tasks with a primary focus on question answering. Its training involved exposure to a diverse and contemporary dataset, ensuring its adaptability to a wide range of linguistic nuances and semantic intricacies. The fine-tuning process refines the model's understanding of context, allowing it to excel in tasks that require nuanced comprehension and contextual reasoning, making it a robust solution for question and answering applications in natural language processing.

Intended Use

This fine-tuned DistilBERT-base-uncased model is designed for versatile natural language processing applications. Its adaptability makes it well-suited for a broad range of tasks, including but not limited to text classification, sentiment analysis, and named entity recognition. Users are strongly advised to conduct a comprehensive performance assessment tailored to their specific tasks and datasets to ascertain its suitability for their particular use case. The model's efficacy and robustness can vary across different applications, and evaluating its performance on targeted tasks is crucial for optimal results.

In this specific instance, the model underwent training with a focus on enhancing its performance in question and answering tasks. The training process was optimized to improve the model's understanding of contextual information and its ability to generate accurate and relevant responses in question-answering scenarios. Users seeking to leverage the model for similar applications are encouraged to evaluate its performance in the context of question and answering benchmarks to ensure alignment with their intended use case.

Training Data

The model was fine-tuned on an updated dataset collected from diverse sources to enhance its performance on a broad range of natural language understanding tasks.

Model Architecture

The underlying architecture of the model is rooted in DistilBERT-base-uncased, a variant designed to be both smaller and computationally more efficient than its precursor, BERT. This architecture optimization enables the model to retain a substantial portion of BERT's performance capabilities while demanding significantly fewer computational resources. DistilBERT achieves this efficiency through a process of knowledge distillation, wherein the model is trained to mimic the behavior and knowledge of the larger BERT model, resulting in a streamlined yet effective representation of language understanding. This reduction in complexity makes the model particularly well-suited for scenarios where computational resources are constrained, without compromising on the quality of natural language processing tasks.

Moreover, the choice of DistilBERT as the base architecture aligns with the broader trend in developing models that strike a balance between performance and resource efficiency. Researchers and practitioners aiming for state-of-the-art results in natural language processing applications increasingly consider such distilled architectures due to their pragmatic benefits in deployment, inference speed, and overall versatility across various computational environments.

How to Use

To use this model for medical text summarization, you can follow these steps:

from transformers import pipeline

question = "What human advancement first emerged around 12,000 years ago during the Neolithic era?"
context = "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."

question_answerer = pipeline("question-answering", model="Falconsai/question_answering")
question_answerer(question=question, context=context)


from transformers import AutoTokenizer
from transformers import AutoModelForQuestionAnswering

question = "What human advancement first emerged around 12,000 years ago during the Neolithic era?"
context = "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."

tokenizer = AutoTokenizer.from_pretrained("Falconsai/question_answering")
inputs = tokenizer(question, context, return_tensors="pt")

model = AutoModelForQuestionAnswering.from_pretrained("Falconsai/question_answering")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()
predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
tokenizer.decode(predict_answer_tokens)

Ethical Considerations

Care has been taken to minimize biases in the training data. However, biases may still be present, and users are encouraged to evaluate the model's predictions for potential bias and fairness concerns, especially when applied to different demographic groups.

Limitations

While this model performs well on standard benchmarks, it may not generalize optimally to all datasets or tasks. Users are advised to conduct thorough evaluation and testing in their specific use case.

Contact Information

For inquiries or issues related to this model, please contact [https://falcons.ai/].


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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
DistilBertForQuestionAnswering
Ревизия весов
43af45e

0 моделей