grammarly/spivavtor
Viewer • Updated • 69.8k • 251 • 5
Run grammarly/spivavtor-large 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:
Use HF Jobs to fine-tune https://huggingface.co/grammarly/spivavtor-large. 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.
Use HF Jobs to run batch inference with https://huggingface.co/grammarly/spivavtor-large 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.
How to use grammarly/spivavtor-large with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("grammarly/spivavtor-large")
model = AutoModelForSeq2SeqLM.from_pretrained("grammarly/spivavtor-large", device_map="auto")This model was obtained by instruction tuning bigscience/mt0-large model on the Spivavtor dataset. All details of the dataset and fine tuning process can be found in our paper.
Paper: Spivavtor: An Instruction Tuned Ukrainian Text Editing Model
Authors: Aman Saini, Artem Chernodub, Vipul Raheja, Vivek Kulkarni
We make the following models available from our paper.
| Model | Number of parameters | Reference name in Paper |
|---|---|---|
| Spivavtor-large | 1.2B | SPIVAVTOR-MT0-LARGE |
| Spivavtor-xxl | 13B | SPIVAVTOR-AYA-101 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("grammarly/spivavtor-large")
model = AutoModelForSeq2SeqLM.from_pretrained("grammarly/spivavtor-large")
# Paraphrase the sentence: What is the greatest compliment that you ever received from anyone?
input_text = 'Перефразуйте речення: Який найкращий комплімент, який ти отримував від будь-кого?'
inputs = tokenizer.encode(input_text, return_tensors="pt")
output = model.generate(inputs, max_length=256)
output_text = tokenizer.decode(outputs[0], skip_special_tokens=True)