--- language: - ru license: apache-2.0 base_model: google/gemma-3-4b-it tags: - spief - gemma - gemma-3 - russian - LoRA --- # Alesya-1-4B ## Model Details * **Base Model:** google/gemma-3-4b-it * **Fine-tuned with:** LoRA * **Domain:** SPIEF (St. Petersburg International Economic Forum) * **Language:** Russian ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch model_id = "ArtemkaT08/alesya-1-4B" 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) ```