Update README.md
Browse files
README.md
CHANGED
|
@@ -19,8 +19,12 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 19 |
tokenizer = AutoTokenizer.from_pretrained("budecosystem/sql-millennials-13b")
|
| 20 |
model = AutoModelForCausalLM.from_pretrained("budecosystem/sql-millennials-13b")
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 26 |
sample = model.generate(**inputs, max_length=128)
|
|
|
|
| 19 |
tokenizer = AutoTokenizer.from_pretrained("budecosystem/sql-millennials-13b")
|
| 20 |
model = AutoModelForCausalLM.from_pretrained("budecosystem/sql-millennials-13b")
|
| 21 |
|
| 22 |
+
template = """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
|
| 23 |
+
### Instruction: {instruction} ### Response:"
|
| 24 |
+
|
| 25 |
+
instruction = <Your code instruction here>
|
| 26 |
+
|
| 27 |
+
prompt = template.format(instruction=instruction)
|
| 28 |
|
| 29 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 30 |
sample = model.generate(**inputs, max_length=128)
|