Downloads · 30 days
53
7% of all-time downloads
AlgorithmicResearchGroup/flan-t5-base-arxiv-math-question-answering
flan-t5-base-arxiv-math-question-answering is a summarization model from AlgorithmicResearchGroup. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as apache-2.0.
0. TL;DR 1. Model Details 2. Usage 3. Uses 4. Citation
Downloads · 30 days
53
7% of all-time downloads
All-time downloads
757
Public
Parameters
248M
4 GB on disk
Likes
1
Public
Click a slice to open those files.
.pt2 GB · 50%
From the Hugging Face model README
This is a FLAN-T5 model trained on ArtifactAI/arxiv-math-instruct-50k. This model is for research purposes only and should not be used in production settings. The output it highly unreliable.
Find below some example scripts on how to use the model in transformers:
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering")
model = T5ForConditionalGeneration.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering")
input_text = "What is the spectral isolation of bi-invariant metrics?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
# pip install accelerate
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering")
model = T5ForConditionalGeneration.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering", device_map="auto")
input_text = "What is the spectral isolation of bi-invariant metrics?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
# load model and tokenizer from huggingface hub with pipeline
qa = pipeline("summarization", model="ArtifactAI/flan-t5-base-arxiv-math-question-answering")
query = "What is the spectral isolation of bi-invariant metrics?"
print(f"query: {query}")
res = qa("answer: " + query)
print(f"{res[0]['summary_text']}")
The model was trained on ArtifactAI/arxiv-math-instruct-50k, a dataset of question/answer pairs. Questions are generated using the t5-base model, while the answers are generated using the GPT-3.5-turbo model.
@misc{flan-t5-base-arxiv-math-question-answering,
title={flan-t5-base-arxiv-math-question-answering},
author={Matthew Kenney},
year={2023}
}