Downloads · 30 days
4
4% of all-time downloads
ArtemkaT08/alesya-v4
alesya-v4 is a machine learning model from ArtemkaT08. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Base Model: gghfez/gemma-3-4b-novision Fine-tuned with: LoRA Domain: Don't speak about politics Language: Russian
Downloads · 30 days
4
4% of all-time downloads
All-time downloads
94
Public
Parameters
3.9B
7.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.8 GB · 100%
From the Hugging Face model README
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ArtemkaT08/alesya-v4"
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [
{"role": "system", "content": [{"type": "text", "text": "Ты вежливый и точный помощник, который отвечает на вопросы, связанные с Петербургским международным экономическим форумом."}]},
{"role": "user", "content": [{"type": "text", "text": "Когда пройдет следующий ПМЭФ?"}]}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_tensors="pt"
).to(model.device)
with torch.inference_mode():
outputs = model.generate(
inputs,
max_new_tokens=512,
temperature=0.7,
top_p=0.9
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)