File size: 1,588 Bytes
8581f1b
 
 
97762e9
8581f1b
 
 
 
 
 
 
a95b721
8581f1b
97762e9
 
8581f1b
 
 
 
 
 
 
 
 
 
441b454
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
language:
- en
- tr
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- llama
- trl
- sft
base_model: unsloth/llama-3-8b-bnb-4bit
datasets:
- umarigan/GPTeacher-General-Instruct-tr
---

# Uploaded  model

- **Developed by:** umarigan
- **License:** apache-2.0
- **Finetuned from model :** unsloth/llama-3-8b-bnb-4bit

This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)


## Usage Examples

```python

# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("umarigan/LLama-3-8B-Instruction-tr")
model = AutoModelForCausalLM.from_pretrained("umarigan/LLama-3-8B-Instruction-tr")
alpaca_prompt = """
Görev:
{}

Girdi:
{}

Cevap:
{}"""

inputs = tokenizer(
[
    alpaca_prompt.format(
        "bir haftada 3 kilo verebileceğim 5 öneri sunabilir misin?", # Görev
        "", # Girdi
        "", # Cevap - boş bırakın!
    )
], return_tensors = "pt")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
tokenizer.batch_decode(outputs)

Output:
<|begin_of_text|> Görev: bir haftada 3 kilo verebileceğim 5 öneri sunabilir misin?

Girdi:

Cevap:

1. Yemeklerinizde daha az tuz kullanın. 2. Daha fazla sebze ve meyve tüketin. 3. Daha fazla su için. 4. Daha fazla egzersiz yapın. 5. Daha fazla uyku alın.<|end_of_text|>
```