cutycat2000x
commited on
Commit
•
f67cd19
1
Parent(s):
52865d8
Update README.md
Browse files
README.md
CHANGED
@@ -36,7 +36,7 @@ model = AutoModelForCausalLM.from_pretrained("cutycat2000x/MeowGPT-3.5")
|
|
36 |
An example of how to prompt the model for generating text:
|
37 |
|
38 |
```python
|
39 |
-
prompt = "
|
40 |
```
|
41 |
|
42 |
The <s> and </s> are start and end tokens.
|
|
|
36 |
An example of how to prompt the model for generating text:
|
37 |
|
38 |
```python
|
39 |
+
prompt = "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + eos_token }}{% endif %}{% endfor %}"
|
40 |
```
|
41 |
|
42 |
The <s> and </s> are start and end tokens.
|