Views
No views yet
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_id = "NorGLM/NorGPT-3B-continue"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 device_map='auto',
9 torch_dtype=torch.bfloat16
10)
11
12text = "Tom ønsket å gå på barene med venner"
13inputs = tokenizer(text, return_tensors="pt")
14outputs = model.generate(**inputs, max_new_tokens=20)@article{gulla2026norwai,
title={NorwAI's Large Language Models: Technical Report},
author={Gulla, Jon Atle and Liu, Peng and Zhang, Lemei},
journal={arXiv preprint arXiv:2601.03034},
year={2026}
}
@inproceedings{liu2024nlebench+,
title={NLEBench+NorGLM: A Comprehensive Empirical Analysis and Benchmark Dataset for Generative Language Models in Norwegian},
author={Liu, Peng and Zhang, Lemei and Farup, Terje and Lauvrak, Even and Ingvaldsen, Jon and Eide, Simen and Gulla, Jon Atle and Yang, Zhirong},
booktitle={Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing},
pages={5543--5560},
year={2024}
}