Downloads · 30 days
0
0% of all-time downloads
akshitha-k/oneliner-to-stories
oneliner-to-stories is a machine learning model from akshitha-k. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
- Developed by: akshitha-k - License: apache-2.0 - Finetuned from model : unsloth/gemma-2-9b-bnb-4bit
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
22
Public
Repo size
903 MB
Likes
0
Public
Click a slice to open those files.
.safetensors864 MB · 96%
From the Hugging Face model README
!pip install unsloth
from transformers import TextStreamer
gemma_prompt = """
### Input:
{}
### Response:
{}"""
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "akshitha-k/oneliner-to-stories",
max_seq_length = 1024,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer(
[
gemma_prompt.format(
"Ash and Roh went to the forest..", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 512)
This gemma2 model was trained 2x faster with Unsloth and Huggingface's TRL library.