Views
No views yet
modeling_nort5.py, you should therefore load the model with trust_remote_code=True.pip install transformers==4.46.11from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_path = 'HPLT/hplt_t5_base_3_0_nob_Latn'
4model = AutoModelForSeq2SeqLM.from_pretrained(
5 model_path, trust_remote_code=True, use_safetensors=False,
6)
7tokenizer = AutoTokenizer.from_pretrained(model_path)
8# MASKED LANGUAGE MODELING
9sentence = "Ansiktsuttrykket duckface har [MASK_1] seg til et utbredt kulturelt fenomen."
10encoding = tokenizer(sentence, return_tensors="pt")
11mask_1 = tokenizer.convert_tokens_to_ids("[MASK_1]")
12mask_2 = tokenizer.convert_tokens_to_ids("[MASK_2]")
13output_tensor = model.generate(
14 encoding.input_ids,
15 decoder_start_token_id=mask_1,
16 eos_token_id=mask_2,
17 )
18print(tokenizer.decode(output_tensor.squeeze(), skip_special_tokens=False))
19# should output: '[MASK_1]utviklet[MASK_2]'stepXXX: for example, step18750.transformers using the argument revision:model = AutoModelForSeq2SeqLM.from_pretrained("HPLT/hplt_t5_base_3_0_pol_Latn", revision="step21875", trust_remote_code=True)1from huggingface_hub import list_repo_refs
2out = list_repo_refs("HPLT/hplt_t5_base_3_0_pol_Latn")
3print([b.name for b in out.branches])1@inproceedings{samuel-etal-2023-norbench,
2 title = "{N}or{B}ench {--} A Benchmark for {N}orwegian Language Models",
3 author = "Samuel, David and
4 Kutuzov, Andrey and
5 Touileb, Samia and
6 Velldal, Erik and
7 {\O}vrelid, Lilja and
8 R{\o}nningstad, Egil and
9 Sigdel, Elina and
10 Palatkina, Anna",
11 editor = {Alum{\"a}e, Tanel and
12 Fishel, Mark},
13 booktitle = "Proceedings of the 24th Nordic Conference on Computational Linguistics (NoDaLiDa)",
14 month = may,
15 year = "2023",
16 address = "T{\'o}rshavn, Faroe Islands",
17 publisher = "University of Tartu Library",
18 url = "https://aclanthology.org/2023.nodalida-1.61/",
19 pages = "618--633",
20 abstract = "We present NorBench: a streamlined suite of NLP tasks and probes for evaluating Norwegian language models (LMs) on standardized data splits and evaluation metrics. We also introduce a range of new Norwegian language models (both encoder and encoder-decoder based). Finally, we compare and analyze their performance, along with other existing LMs, across the different benchmark tests of NorBench."
21}1@inproceedings{burchell-etal-2025-expanded,
2 title = "An Expanded Massive Multilingual Dataset for High-Performance Language Technologies ({HPLT})",
3 author = {Burchell, Laurie and
4 de Gibert, Ona and
5 Arefyev, Nikolay and
6 Aulamo, Mikko and
7 Ba{\~n}{\'o}n, Marta and
8 Chen, Pinzhen and
9 Fedorova, Mariia and
10 Guillou, Liane and
11 Haddow, Barry and
12 Haji{\v{c}}, Jan and
13 Helcl, Jind{\v{r}}ich and
14 Henriksson, Erik and
15 Klimaszewski, Mateusz and
16 Komulainen, Ville and
17 Kutuzov, Andrey and
18 Kyt{\"o}niemi, Joona and
19 Laippala, Veronika and
20 M{\ae}hlum, Petter and
21 Malik, Bhavitvya and
22 Mehryary, Farrokh and
23 Mikhailov, Vladislav and
24 Moghe, Nikita and
25 Myntti, Amanda and
26 O{'}Brien, Dayy{\'a}n and
27 Oepen, Stephan and
28 Pal, Proyag and
29 Piha, Jousia and
30 Pyysalo, Sampo and
31 Ram{\'i}rez-S{\'a}nchez, Gema and
32 Samuel, David and
33 Stepachev, Pavel and
34 Tiedemann, J{\"o}rg and
35 Vari{\v{s}}, Du{\v{s}}an and
36 Vojt{\v{e}}chov{\'a}, Tereza and
37 Zaragoza-Bernabeu, Jaume},
38 editor = "Che, Wanxiang and
39 Nabende, Joyce and
40 Shutova, Ekaterina and
41 Pilehvar, Mohammad Taher",
42 booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
43 month = jul,
44 year = "2025",
45 address = "Vienna, Austria",
46 publisher = "Association for Computational Linguistics",
47 url = "https://aclanthology.org/2025.acl-long.854/",
48 doi = "10.18653/v1/2025.acl-long.854",
49 pages = "17452--17485",
50 ISBN = "979-8-89176-251-0",
51 abstract = "Training state-of-the-art large language models requires vast amounts of clean and diverse textual data. However, building suitable multilingual datasets remains a challenge. In this work, we present HPLT v2, a collection of high-quality multilingual monolingual and parallel corpora, extending prior work of the HPLT project. The monolingual portion of the data contains 8T tokens covering 193 languages, while the parallel data contains 380M sentence pairs covering 51 languages. We document the entire data pipeline and release the code to reproduce it. We provide extensive analysis of the quality and characteristics of our data. Finally, we evaluate the performance of language models and machine translation systems trained on HPLT v2, demonstrating its value."
52}