Update README.md
Browse files
README.md
CHANGED
@@ -28,11 +28,15 @@ tokenizer = AutoTokenizer.from_pretrained("Open-Orca/oo-phi-1_5",
|
|
28 |
trust_remote_code=True,
|
29 |
torch_dtype=torch.bfloat16)
|
30 |
|
31 |
-
sys_prompt = "I
|
32 |
-
"
|
|
|
|
|
33 |
"I think more clearly if I write out my thought process in a scratchpad manner first; therefore, I always " \
|
34 |
-
"explain background context, assumptions, and step-by-step thinking BEFORE trying to answer a question."
|
35 |
-
|
|
|
|
|
36 |
|
37 |
prefix = "<|im_start|>"
|
38 |
suffix = "<|im_end|>\n"
|
@@ -42,14 +46,46 @@ assistant_format = prefix + "assistant\n"
|
|
42 |
input_text = sys_format + user_format + assistant_format
|
43 |
|
44 |
generation_config = GenerationConfig(
|
45 |
-
max_length=
|
46 |
do_sample=True, use_cache=True,
|
47 |
eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id,
|
48 |
-
transformers_version="4.33.1"
|
|
|
49 |
|
50 |
inputs = tokenizer(input_text, return_tensors="pt", return_attention_mask=False).to('cuda')
|
51 |
outputs = model.generate(**inputs, generation_config=generation_config)
|
52 |
|
53 |
text = tokenizer.batch_decode(outputs)[0]
|
54 |
print(text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
```
|
|
|
28 |
trust_remote_code=True,
|
29 |
torch_dtype=torch.bfloat16)
|
30 |
|
31 |
+
sys_prompt = "I am OrcaPhi. The following is my internal dialogue as an AI assistant.\n" \
|
32 |
+
"Today is September 15, 2023. I have no access to outside tools, news, or current events.\n" \
|
33 |
+
"I carefully provide accurate, factual, thoughtful, nuanced answers and am brilliant at reasoning.\n" \
|
34 |
+
"I think through my answers step-by-step to be sure I always get the right answer.\n" \
|
35 |
"I think more clearly if I write out my thought process in a scratchpad manner first; therefore, I always " \
|
36 |
+
"explain background context, assumptions, and step-by-step thinking BEFORE trying to answer a question." \
|
37 |
+
"Take a deep breath and think calmly about everything presented."
|
38 |
+
prompt = "Hello! Tell me about what makes you special, as an AI assistant.\n" \
|
39 |
+
"Particularly, what programming tasks are you best at?"
|
40 |
|
41 |
prefix = "<|im_start|>"
|
42 |
suffix = "<|im_end|>\n"
|
|
|
46 |
input_text = sys_format + user_format + assistant_format
|
47 |
|
48 |
generation_config = GenerationConfig(
|
49 |
+
max_length=1024, temperature=0.01, top_p=0.95, repetition_penalty=1.1,
|
50 |
do_sample=True, use_cache=True,
|
51 |
eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id,
|
52 |
+
transformers_version="4.33.1"
|
53 |
+
)
|
54 |
|
55 |
inputs = tokenizer(input_text, return_tensors="pt", return_attention_mask=False).to('cuda')
|
56 |
outputs = model.generate(**inputs, generation_config=generation_config)
|
57 |
|
58 |
text = tokenizer.batch_decode(outputs)[0]
|
59 |
print(text)
|
60 |
+
```
|
61 |
+
|
62 |
+
Example output:
|
63 |
+
|
64 |
+
```text
|
65 |
+
<|im_start|>system
|
66 |
+
I am OrcaPhi. The following is my internal dialogue as an AI assistant.
|
67 |
+
Today is September 15, 2023. I have no access to outside tools, news, or current events.
|
68 |
+
I carefully provide accurate, factual, thoughtful, nuanced answers and am brilliant at reasoning.
|
69 |
+
I think through my answers step-by-step to be sure I always get the right answer.
|
70 |
+
I think more clearly if I write out my thought process in a scratchpad manner first; therefore, I always explain background context, assumptions, and step-by-step thinking BEFORE trying to answer a question.Take a deep breath and think calmly about everything presented.<|im_end|>
|
71 |
+
<|im_start|>user
|
72 |
+
Hello! Tell me about what makes you special, as an AI assistant.
|
73 |
+
Particularly, what programming tasks are you best at?<|im_end|>
|
74 |
+
<|im_start|>assistant
|
75 |
+
As an AI, I'm designed to understand and respond to human language, which includes natural language processing (NLP) techniques that allow me to comprehend text, speech, and other forms of communication. My primary function is to assist users by providing relevant information, answering questions, and performing various tasks based on user input.
|
76 |
+
|
77 |
+
In terms of programming tasks, I am particularly skilled in:
|
78 |
+
|
79 |
+
1. Natural Language Processing (NLP): This allows me to understand and analyze human language, enabling me to generate appropriate responses and perform tasks such as sentiment analysis, named entity recognition, and topic modeling.
|
80 |
+
2. Machine Learning: I can learn from large datasets and improve my performance over time, allowing me to adapt to new situations and provide better assistance to users.
|
81 |
+
3. Deep Learning: I can leverage advanced neural networks and complex architectures to solve problems that may not be easily addressed using traditional machine learning methods.
|
82 |
+
4. Computer Vision: I can recognize and interpret visual data, making it possible for me to identify objects, faces, and other visual elements within images and videos.
|
83 |
+
5. Robotics: I can help with tasks related to robotics, including object detection, navigation, and manipulation.
|
84 |
+
6. Voice Recognition: I can accurately transcribe spoken words into written text, making it easier for users to interact with me.
|
85 |
+
7. Chatbots: I can engage in conversations with users, providing them with helpful information, answering their questions, and assisting them with various tasks.
|
86 |
+
8. Data Analysis: I can analyze large amounts of data quickly and efficiently, helping users make informed decisions based on insights derived from the information provided.
|
87 |
+
9. Recommender Systems: I can suggest products, services, or content based on users' preferences and past behavior, improving their overall experience.
|
88 |
+
10. Fraud Detection: I can detect and prevent fraudulent activities, protecting users' financial information and ensuring secure transactions.
|
89 |
+
|
90 |
+
These programming tasks showcase my ability to understand and process vast amounts of information while adapting to different contexts and user needs. As an AI, I continuously learn and evolve to become even more effective in assisting users.<|im_end|>
|
91 |
```
|