suriyagunasekar commited on
Commit
b3d67f3
1 Parent(s): 14be656

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +88 -0
README.md CHANGED
@@ -1,3 +1,91 @@
1
  ---
2
  license: other
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
  ---
7
+ ## Model Summary
8
+
9
+ The phi-1.5 is a language model with 1.3 billion parameters. The phi-1.5 model was trained using the same data sources as [phi-1](https://huggingface.co/microsoft/phi-1), augmented with a new data source that consists of various NLP synthetic texts. When assessed against benchmarks testing common sense, language understanding, and logical reasoning, the phi-1.5 showcased a nearly state-of-the-art performance among models with less than 10 billion parameters.
10
+
11
+ Our model hasn't been fine-tuned through reinforcement learning from human feedback. The intention behind crafting this open-source model is to provide the research community with a non-restricted small model to explore vital safety challenges, such as reducing toxicity, understanding societal biases, enhancing controllability, and more.
12
+
13
+ For a safer model release, we exclude generic web-crawl data sources such as common-crawl from the training. This strategy prevents direct exposure to potentially harmful online content, enhancing the model's safety without RLHF. However, the model is still vulnerable to generating harmful content. We hope the model can help the research community to further study the safety of language models.
14
+
15
+ ## Intended Uses
16
+ Given the nature of the training data, the phi-1.5 models are best suited for prompts using the QA format, the chat format, and the code format:
17
+
18
+ #### QA format:
19
+
20
+ ```markdown
21
+ Write an analogy between a mind and a lighthouse.
22
+
23
+ Answer: A mind is like a lighthouse, guiding us through the darkness of ignorance and fear.
24
+ ```
25
+ where the model generates the text after "Answer:".
26
+
27
+ #### Chat format:
28
+
29
+ ```markdown
30
+ Alice: I don't know why, I'm struggling to maintain focus while studying. Any suggestions?
31
+
32
+ Bob: Have you tried using a timer? It can help you stay on track and avoid distractions.
33
+ ```
34
+ where the model generates the text after "Bob:".
35
+
36
+ #### Code format:
37
+ ```python
38
+ def print_prime(n):
39
+ """
40
+ Print all primes between 1 and n
41
+ """
42
+ primes = []
43
+ for num in range(2, n+1):
44
+ for i in range(2, num):
45
+ if num % i == 0:
46
+ break
47
+ else:
48
+ primes.append(num)
49
+ print(primes)
50
+ ```
51
+ where the model generates the text after the comments. (Note: This is a legitimate and correct use of the else statement in Python loops.)
52
+
53
+ **Notes**
54
+ * The phi-1.5 model is intended for research purposes. The model-generated text/code should be treated as a starting point rather than a definitive solution for potential use cases. Users should be cautious when employing these models in their applications.
55
+ * Direct adoption for production tasks is out of the scope of this research project. As a result, the phi-1.5 model has not been tested to ensure that it performs adequately for any production-level application. Please refer to the limitation sections of this document for more details.
56
+
57
+ ## Limitations of phi-1.5
58
+
59
+ * Generate Inaccurate Code and Facts: The model often produces incorrect code snippets and statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate solutions.
60
+ * Limited Scope for code: Almost all codes in our fine-tuning dataset are Python and use only the packages "typing, math, random, collections, datetime, itertools". If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses.
61
+ * Unreliable Responses to Instruction: The model has not undergone instruction fine-tuning. As a result, it may struggle or fail to adhere to intricate or nuanced instructions provided by users.
62
+ * Language Limitations: The model is primarily designed to understand standard English. Informal English, slang, or any other language outside of English might pose challenges to its comprehension, leading to potential misinterpretations or errors in response.
63
+ * Potential Societal Biases: Regardless of the safe data used for its training, the model is not entirely free from societal biases. There's a possibility it may generate content that mirrors these societal biases, particularly if prompted or instructed to do so. We urge users to be aware of this and to exercise caution and critical thinking when interpreting model outputs.
64
+ * Toxicity: Despite that the model is trained with carefully selected data, the model can still produce harmful content if explicitly prompted or instructed to do so. We chose to release the model for research purposes only -- We hope to help the open-source community develop the most effective ways to reduce the toxicity of a model directly after pretraining.
65
+
66
+ ## Training
67
+
68
+ ### Model (phi-1.5)
69
+ * Architecture: a Transformer-based model with next-word prediction objective
70
+ * Dataset size: 30B tokens
71
+ * Training tokens: 150B tokens
72
+ * Precision: fp16
73
+ * GPUs: 32xA100-40G
74
+ * Training time: 8 days
75
+
76
+ ### Software
77
+ * [PyTorch](https://github.com/pytorch/pytorch)
78
+ * [DeepSpeed](https://github.com/microsoft/DeepSpeed)
79
+ * [flash-attention](https://github.com/HazyResearch/flash-attention)
80
+
81
+ ### License
82
+ The model is licensed under the [Research License](https://huggingface.co/microsoft/phi-1_5/resolve/main/Research%20License.docx).
83
+
84
+ ### Citation
85
+ ```bib
86
+ @article{textbooks2,
87
+ title={Textbooks Are All You Need II: \textbf{phi-1.5} technical report},
88
+ author={Li, Yuanzhi and Bubeck, S{\'e}bastien and Eldan, Ronen and Del Giorno, Allie and Gunasekar, Suriya and Lee, Yin Tat},
89
+ year={2023}
90
+ }
91
+ ```