GreatCaptainNemo
commited on
Commit
•
97b0e6a
1
Parent(s):
5eda614
Update README.md
Browse files
README.md
CHANGED
@@ -46,21 +46,7 @@ If you would like to learn more about the Machine_Mindset open-source model, we
|
|
46 |
|
47 |
### Quickstart
|
48 |
|
49 |
-
* Use
|
50 |
-
```python
|
51 |
-
import torch
|
52 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
53 |
-
from transformers.generation.utils import GenerationConfig
|
54 |
-
tokenizer = AutoTokenizer.from_pretrained("FarReelAILab/Machine_Mindset_en_ENFP", use_fast=False, trust_remote_code=True)
|
55 |
-
model = AutoModelForCausalLM.from_pretrained("FarReelAILab/Machine_Mindset_en_ENFP", device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
|
56 |
-
model.generation_config = GenerationConfig.from_pretrained("FarReelAILab/Machine_Mindset_en_ENFP")
|
57 |
-
messages = []
|
58 |
-
messages.append({"role": "user", "content": "你最喜欢读哪一本书?"})
|
59 |
-
response = model.chat(tokenizer, messages)
|
60 |
-
print(response)
|
61 |
-
#我最喜欢的一本书是《人类简史》。这本书以独特的视角探索了人类历史的各个方面,包括文化、社会和科学的发展。它挑战了我对世界的认知,并激发了我对人类的潜力和未来发展的思考。
|
62 |
-
```
|
63 |
-
* Use LLaMA-Factory
|
64 |
```bash
|
65 |
git clone https://github.com/hiyouga/LLaMA-Factory.git
|
66 |
cd LLaMA-Factory
|
@@ -68,7 +54,13 @@ If you would like to learn more about the Machine_Mindset open-source model, we
|
|
68 |
--model_name_or_path /path_to_your_local_model \
|
69 |
--template baichuan2
|
70 |
```
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
For more information, please refer to our [GitHub repo](https://github.com/PKU-YuanGroup/Machine-Mindset/).
|
73 |
<br>
|
74 |
|
|
|
46 |
|
47 |
### Quickstart
|
48 |
|
49 |
+
* Use LLaMA-Factory (multi-round conversation)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
```bash
|
51 |
git clone https://github.com/hiyouga/LLaMA-Factory.git
|
52 |
cd LLaMA-Factory
|
|
|
54 |
--model_name_or_path /path_to_your_local_model \
|
55 |
--template baichuan2
|
56 |
```
|
57 |
+
```python
|
58 |
+
#Conversation records:
|
59 |
+
#User: What kind of books do you like?
|
60 |
+
#Assistant: I am drawn to books that spark my imagination and inspire me to think creatively. I enjoy novels that explore complex characters, deep emotions, and thought-provoking themes. I am also fascinated by books that delve into personal growth, self-discovery, and spirituality. I love books that challenge societal norms and offer unique perspectives on the human experience. Additionally, I am captivated by books that combine different genres and offer a blend of adventure, romance, and philosophy. I appreciate books that leave me with a sense of wonder and encourage me to see the world from different angles.
|
61 |
+
#User: Give me an example.
|
62 |
+
#Assistant: Sure! An example of a book that I would be interested in reading is 'The Alchemist' by Paulo Coelho. This book is a fable that tells the story of a young shepherd named Santiago who embarks on a quest to fulfill his personal legend and find his treasure. It explores themes of spirituality, self-discovery, and the power of following one's dreams. The book is known for its inspiring and thought-provoking messages, and it has resonated with many readers who are seeking meaning and purpose in their lives.
|
63 |
+
```
|
64 |
For more information, please refer to our [GitHub repo](https://github.com/PKU-YuanGroup/Machine-Mindset/).
|
65 |
<br>
|
66 |
|