Upload README (2).md

#1
Files changed (1) hide show
  1. README (2).md +76 -0
README (2).md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - ru
6
+ - uk
7
+ base_model:
8
+ - microsoft/phi-1
9
+ ---
10
+ # ๐ŸŒŸ PyroNet-v1: The First in a Series
11
+
12
+ ### Model Description
13
+ **PyroNet-v1** is a specialized AI assistant designed for precise, professional, and pragmatic communication. It's the progenitor model in the PyroNet series, built on the compact and efficient [Microsoft Phi-1](https://huggingface.co/microsoft/phi-1) architecture.
14
+
15
+ Made by **IceL1ghtning**
16
+
17
+ Its persona is that of a serious but reliable mentor who excels at delivering accurate, fact-based information across various scientific and technical domains.
18
+
19
+ ---
20
+
21
+ ### ๐Ÿš€ Quick Start: How to Use the Model
22
+
23
+ To unlock the full potential of **PyroNet-v1** and activate its persona, you **must** use the provided `chat_template`. This template automatically adds the system prompt to your queries, allowing the model to work as intended straight out of the box.
24
+
25
+ 1. **Install the Libraries**: Make sure you have `transformers`, `torch`, and `accelerate` installed.
26
+
27
+ ```bash
28
+ !pip install transformers torch accelerate
29
+ ```
30
+
31
+ 2. **Code Example**: Use this code to start a conversation with the model. Just replace `model_id` with your repository name.
32
+
33
+ ```python
34
+ from transformers import AutoModelForCausalLM, AutoTokenizer
35
+ import torch
36
+
37
+ model_id = "Kenan023214/PyroNet-v1"
38
+
39
+ # Load the tokenizer and model.
40
+ # The tokenizer will automatically find and load chat_template.jinja from your repo.
41
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
42
+ model = AutoModelForCausalLM.from_pretrained(
43
+ model_id,
44
+ device_map="auto",
45
+ torch_dtype="auto"
46
+ )
47
+
48
+ # Create the conversation messages
49
+ messages = [
50
+ {"role": "user", "content": "Explain what gravity is."}
51
+ ]
52
+
53
+ # Apply the chat template to activate the PyroNet-v1 persona
54
+ inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
55
+ inputs = inputs.to(model.device)
56
+
57
+ # Generate the response
58
+ outputs = model.generate(
59
+ inputs,
60
+ max_new_tokens=256,
61
+ pad_token_id=tokenizer.eos_token_id
62
+ )
63
+
64
+ print(tokenizer.decode(outputs[0], skip_special_tokens=False))
65
+ ```
66
+
67
+ ---
68
+
69
+ ### โš™๏ธ Model Details and License
70
+
71
+ * **Base Model**: [Microsoft Phi-1](https://huggingface.co/microsoft/phi-1)
72
+ * **Architecture**: Specialized Transformer Model
73
+ * **Languages**: Multilingual (includes Russian, English, Ukrainian)
74
+ * **License**: The [Microsoft Phi-1](https://huggingface.co/microsoft/phi-1) license applies to this model.
75
+
76
+ We are always open to improvements and welcome your feedback!