Инструктивная модель на основе Vikhr-Qwen-2.5-1.5B-Instruct, обученная на русскоязычном сгенерированном датасете. Создана для ответа на запросы в роли волшебного психолога из Хоггвартса.
Пример использования:
def generate_answer(model, tokenizer, prompt):
inputs = tokenizer.apply_chat_template([{"role": "system", "content": BASE_SYSTEM_PROMPT},{"role": "user", "content": prompt}],
add_generation_prompt=True,
tokenize=True,
return_tensors="pt",
return_dict=True
).to('cuda')
gen_kwargs = {"temperature":0.5,
"top_p":0.8,
"max_length":512,
"repetition_penalty":1.05,
"do_sample": True}
with torch.no_grad():
outputs = model.generate(**inputs, **gen_kwargs)
outputs = outputs[:, inputs['input_ids'].shape[1]:]
return tokenizer.decode(outputs[0], skip_special_tokens=True)
- Downloads last month
- 230
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.