Run this model with HF Jobs
Run allenai/PRIMERA-multixscience on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/allenai/PRIMERA-multixscience. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/allenai/PRIMERA-multixscience on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use allenai/PRIMERA-multixscience with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/PRIMERA-multixscience with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("allenai/PRIMERA-multixscience") model = AutoModelForSeq2SeqLM.from_pretrained("allenai/PRIMERA-multixscience", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files123---license: apache-2.0---12345678910111213141516171819202122232425262728---license: apache-2.0---HF-version model for PRIMERA: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization (ACL 2022).The original code can be found [here](https://github.com/allenai/PRIMER). You can find the script and notebook to train/evaluate the model in the original github repo.* Note: due to the difference between the implementations of the original Longformer and the Huggingface LED model, the results of converted models are slightly different. We run a sanity check on both fine-tuned and non fine-tuned models, and show the results below:| Model | Rouge-1 | Rouge-2 | Rouge-L || --- | ----------- |----------- |----------- || PRIMERA | 42.0 | 13.6 | 20.8|| PRIMERA-hf | 41.7 |13.6 | 20.5|| PRIMERA(finetuned) | 49.9 | 21.1 | 25.9|| PRIMERA-hf(finetuned) | 49.9 | 20.9 | 25.8|You can use it by```from transformers import (AutoTokenizer,LEDConfig,LEDForConditionalGeneration,)tokenizer = AutoTokenizer.from_pretrained('allenai/PRIMERA')config=LEDConfig.from_pretrained('allenai/PRIMERA')model = LEDForConditionalGeneration.from_pretrained('allenai/PRIMERA')```
README.md+25