Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,26 @@ language:
|
|
| 4 |
- tr
|
| 5 |
- en
|
| 6 |
- es
|
| 7 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- tr
|
| 5 |
- en
|
| 6 |
- es
|
| 7 |
+
---
|
| 8 |
+
Can you use that LLM with that code;
|
| 9 |
+
|
| 10 |
+
from unsloth import FastLanguageModel
|
| 11 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 12 |
+
model_name = "Meforgers/Aixrav",
|
| 13 |
+
max_seq_length = max_seq_length,
|
| 14 |
+
dtype = dtype,
|
| 15 |
+
load_in_4bit = load_in_4bit,
|
| 16 |
+
)
|
| 17 |
+
FastLanguageModel.for_inference(model)
|
| 18 |
+
|
| 19 |
+
inputs = tokenizer(
|
| 20 |
+
[
|
| 21 |
+
alpaca_prompt.format(
|
| 22 |
+
"Can u text me a basic code?", # instruction
|
| 23 |
+
"", # input
|
| 24 |
+
"", # output - leave this blank for generation!
|
| 25 |
+
)
|
| 26 |
+
], return_tensors = "pt").to("cuda")
|
| 27 |
+
|
| 28 |
+
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
|
| 29 |
+
tokenizer.batch_decode(outputs)
|