Views
No views yet
google/t5gemma-2-270m-270m for SciHigh-2026 Task 1. It generates concise research highlights from scientific paper abstracts.3e-5, batch size 32, max input/target lengths 1024/320, bfloat16, SDPA attention.| Metric | Score |
|---|---|
| ROUGE-1 | 0.3818 |
| ROUGE-2 | 0.1389 |
| ROUGE-L / Lsum | 0.2590 / 0.2591 |
| METEOR | 0.2983 |
| BERTScore F1 | 0.8775 |
1import torch
2from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
3
4model_id = "uthayamurthy/origin-task1-t5gemma2-270m"
5tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
6model = AutoModelForSeq2SeqLM.from_pretrained(
7 model_id,
8 dtype=torch.bfloat16,
9 attn_implementation="sdpa",
10).to("cuda").eval()
11
12abstract = "..."
13inputs = tokenizer(abstract, return_tensors="pt", truncation=True, max_length=1024)
14inputs = {name: value.to("cuda") for name, value in inputs.items()}
15
16with torch.inference_mode():
17 generated = model.generate(
18 **inputs,
19 max_length=128,
20 min_length=0,
21 num_beams=4,
22 length_penalty=1.0,
23 no_repeat_ngram_size=3,
24 early_stopping=True,
25 )
26print(tokenizer.decode(generated[0], skip_special_tokens=True))