Downloads · 30 days
16
40% of all-time downloads
damerajee/Tinyllama-sft-small
Tinyllama-sft-small is a text generation model from damerajee. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
The base model unsloth/tinyllama-bnb-4bitwas Instruct finetuned using Unsloth
Downloads · 30 days
16
40% of all-time downloads
All-time downloads
40
Public
Repo size
101 MB
Likes
0
Public
Click a slice to open those files.
.safetensors101 MB · 98%
From the Hugging Face model README
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:
{}"""
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM ,AutoTokenizer
config = PeftConfig.from_pretrained("damerajee/Tinyllama-sft-small")
model = AutoModelForCausalLM.from_pretrained("unsloth/tinyllama")
tokenizer=AutoTokenizer.from_pretrained("damerajee/Tinyllama-sft-small")
model = PeftModel.from_pretrained(model, "damerajee/Tinyllama-sft-small")l")
inputs = tokenizer(
[
alpaca_prompt.format(
"i want to learn machine learning help me",
"", # input
"", # output
)
]*1, return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 312, use_cache = True)
tokenizer.batch_decode(outputs)
The base model unsloth/tinyllama-bnb-4bitwas Instruct finetuned using Unsloth
The model was trained for 1 epoch on a free goggle colab which took about 1 hour and 30 mins approximately