Run this model with HF Jobs

Run r1char9/ruT5-base-pls 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 and TRL to fine-tune https://huggingface.co/r1char9/ruT5-base-pls. 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/r1char9/ruT5-base-pls 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/r1char9/ruT5-base-pls. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/r1char9/ruT5-base-pls. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from
SGLang
Install from pip and serve model
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
    --model-path "r1char9/ruT5-base-pls" \
    --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": "r1char9/ruT5-base-pls",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Use Docker images
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 "r1char9/ruT5-base-pls" \
        --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": "r1char9/ruT5-base-pls",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

ruT5-base-pls

A fine-tuned version of ai-forever/ruT5-base (formerly sberbank-ai/ruT5-base) for text simplification on Russian text: given a complex sentence, the model generates a simpler paraphrase that preserves its meaning.

Training data

Training metrics

From train.logs:

Metric Value
BLEU 100.0
SARI 28.699
FKGL 31.931

⚠️ A BLEU score of exactly 100.0 is unusual for a generation task and typically indicates the reported score was computed on a degenerate case (e.g. reference == input, or evaluation on the training set itself) rather than genuine model quality — worth re-checking on a proper held-out test set before treating this as the model's real performance.

Usage

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_name = "r1char9/ruT5-base-pls"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

input_text = """Война Советского Союза против фашистской Германии и её союзников
              (Венгрии, Италии, Румынии, Словакии, Хорватии, Финляндии, Японии);
              составная часть Второй мировой войны 1939-1945 гг."""


def example(source, model, tokenizer):
    """
    Simplify a complex text with the model.
    :param source: complex input text
    :param model: the model
    :param tokenizer: the tokenizer
    :return: simplified text generated by the model
    """
    print(f"SOURCE: {source}")
    input_ids, attention_mask = tokenizer(source, return_tensors="pt").values()
    with torch.no_grad():
        output = model.generate(
            input_ids=input_ids.to(model.device),
            attention_mask=attention_mask.to(model.device),
            max_new_tokens=input_ids.size(1) * 2,
            min_length=0,
        )
    return tokenizer.decode(output.squeeze(0), skip_special_tokens=True)


example(input_text, model, tokenizer)

Limitations

  • FKGL (Flesch–Kincaid Grade Level) of 31.931 is far higher than typical simplified-text targets (usually single digits) — worth confirming this metric was computed correctly before drawing conclusions from it.
  • No license has been specified for this model card — add the appropriate license field before publishing, based on the licenses of the base model and the training datasets used.
Downloads last month
82
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for r1char9/ruT5-base-pls

Finetuned
(26)
this model

Collection including r1char9/ruT5-base-pls