vida-nyu/pmc-articles-dataset-mentions-snippets
Viewer • Updated • 6.16k • 97
How to use vida-nyu/flan-t5-base-dataref-info-extract with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="vida-nyu/flan-t5-base-dataref-info-extract") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("vida-nyu/flan-t5-base-dataref-info-extract")
model = AutoModelForSeq2SeqLM.from_pretrained("vida-nyu/flan-t5-base-dataref-info-extract", device_map="auto")How to use vida-nyu/flan-t5-base-dataref-info-extract with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "vida-nyu/flan-t5-base-dataref-info-extract"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vida-nyu/flan-t5-base-dataref-info-extract",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/vida-nyu/flan-t5-base-dataref-info-extract
How to use vida-nyu/flan-t5-base-dataref-info-extract with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "vida-nyu/flan-t5-base-dataref-info-extract" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vida-nyu/flan-t5-base-dataref-info-extract",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "vida-nyu/flan-t5-base-dataref-info-extract" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vida-nyu/flan-t5-base-dataref-info-extract",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use vida-nyu/flan-t5-base-dataref-info-extract with Docker Model Runner:
docker model run hf.co/vida-nyu/flan-t5-base-dataref-info-extract
Fine-tuned flan-t5-base to extract dataset identifiers and repository references from snippets of scientific publications.
What it does: Finds dataset IDs (GSE123456, DOIs, etc.) and repository names (GEO, Zenodo, etc.) in text snippets from papers.
Trained on: vida-nyu/pmc-articles-dataset-mentions-snippets - PMC article snippets extracted using Data Gatherer
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model = AutoModelForSeq2SeqLM.from_pretrained("vida-nyu/flan-t5-base-dataref-info-extract")
tokenizer = AutoTokenizer.from_pretrained("vida-nyu/flan-t5-base-dataref-info-extract")
text = "Extract dataset information: The data are in GEO under GSE123456."
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(**inputs, max_length=256, num_beams=4)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@software{flan_t5_dataset_extraction,
title={Flan-T5 for Dataset Information Extraction},
author={VIDA Lab, NYU},
year={2025},
url={https://huggingface.co/vida-nyu/flan-t5-base-dataref-info-extract}
}
Contact: GitHub Issues | VIDA Lab, NYU
Base model
google/flan-t5-base