Downloads · 30 days
442
2% of all-time downloads
bineric/NorskGPT-Llama3-8b
NorskGPT-Llama3-8b is a text generation model from bineric. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
This model is a Norwegian variant of Meta-Llama-3-8B, fine-tuned on a carefully selected mix of Norwegian instruction pairs. The model is tuned to understand and generate text in Norwegain.
Downloads · 30 days
442
2% of all-time downloads
All-time downloads
23.5K
Public
Parameters
8B
32.1 GB on disk
Likes
13
Public
Click a slice to open those files.
.bin16.1 GB · 50%
From the Hugging Face model README
This model is a Norwegian variant of Meta-Llama-3-8B, fine-tuned on a carefully selected mix of Norwegian instruction pairs. The model is tuned to understand and generate text in Norwegain.
This model is free to use for personal and research use. However a commercial license is required for commerical applications. This model can be used as an assistant-like chat. Try it out :)
<|im_start|>system
Du er NorskGPT ....<|im_end|>
<|im_start|>user
Hei<|im_end|>
<|im_start|>assistant
Hei, hva kan jeg hjelpe deg med?<|im_end|>
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model_name = "bineric/NorskGPT-Llama3-8b"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
messages = [
{"role": "user", "content": "Du er NorskGPT - en AI bot som hjelper brukeren med å svare på spørsmål?"},
{"role": "assistant", "content": "Hei, jeg er NorskGPT, hva kan jeg hjelpe deg med?"},
{"role": "user", "content": "Fortell meg om Oslo"}
]
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
model_inputs = encodeds.to(device)
model.to(device)
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
decoded = tokenizer.batch_decode(generated_ids)
print(decoded[0])
Attribution-NonCommercial-ShareAlike 4.0 International
This model is free to use for personal and research use. However a commercial license is required for commerical applications.
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes .
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.