File size: 1,509 Bytes
0e2f9c5
 
 
 
 
 
 
 
658b4d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e2f9c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
license: mit
language:
- en
- ru
- ik
---
# PyroNet-v1.5

**PyroNet-v1.5** is an advanced AI assistant built on top of **Microsoft Phi-2**.  
It introduces a custom **system persona prompt** through the tokenizer’s `chat_template`, enabling structured reasoning, multilingual support (Russian, English, Ukrainian), and a professional assistant style.  

## 🧠 Model Description
- **Base model:** microsoft/phi-2  
- **Languages:** Russian 🇷🇺, English 🇬🇧, Ukrainian 🇺🇦  
- **Persona:** Professional, precise, calm senior engineer  
- **Reasoning:** Outputs step-by-step `Thought: ...` then `Final Answer: ...`  

## 🚀 Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "Kenan023214/PyroNet-v1.5"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

messages = [{"role": "user", "content": "Hello, who are you?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
## ⚠️ Limitations & Safety

May produce hallucinations or inaccurate outputs.

Not suitable for high-stakes domains (medical, legal, financial).

Refuses unsafe or unethical instructions.