File size: 1,516 Bytes
fda267d
c06c2bd
fda267d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69a4b0d
fda267d
69a4b0d
 
fda267d
 
 
 
 
 
 
000ea0c
fda267d
 
 
3c6a3e8
fda267d
3c6a3e8
fda267d
 
 
070e37a
 
fda267d
3c6a3e8
fda267d
070e37a
 
fda267d
 
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
---
library_name: transformers
base_model: unsloth/tinyllama-bnb-4bit
license: mit
datasets:
- yahma/alpaca-cleaned
language:
- en
pipeline_tag: text-generation
tags:
- Instruct
- TinyLlama
---

# Steps to try the model:

### prompt Template 
```python
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{}

### Input:
{}

### Response:
{}"""
```
### load the model

```python
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("damerajee/tinyllama-sft-small-v2")
model = AutoModelForCausalLM.from_pretrained("damerajee/tinyllama-sft-small-v2")
```
### Inference

```python
inputs = tokenizer(
[
    alpaca_prompt.format(
        "best places to visit in india", # instruction
        "", # input
        "", # output
    )
]*1, return_tensors = "pt")

outputs = model.generate(**inputs, max_new_tokens = 128, use_cache = True)
tokenizer.batch_decode(outputs)
```



# Model Information
The base model [unsloth/tinyllama-bnb-4bit](https://huggingface.co/unsloth/tinyllama-bnb-4bit) was Instruct finetuned using [Unsloth](https://github.com/unslothai/unsloth)

# Model Limitations
The model was trained on a very small dataset so it might not be as good ,will be training on larger dataset soon
# Training Details
The model was trained for 1 epoch on a free goggle colab which took about 1 hour and 30 mins approximately