Views
No views yet
gemma3n-e2b-children-storyteller leverages the powerful gemma-3n-e2b-it-unsloth-bnb-4bit base model and has undergone further fine-tuning to excel at creative storytelling for a young audience. The goal of this fine-tuning was to imbue the model with the ability to craft imaginative narratives, often incorporating whimsical elements, simple language, and positive themes suitable for children.unsloth/gemma-3n-e2b-it-unsloth-bnb-4bitr=16, lora_alpha=32, target_modules=["q_proj", "v_proj"]...]pipeline API.1from transformers import pipeline
2
3# Adjust 'device' as necessary ('cuda' for GPU, '-1' for CPU)
4# Make sure to replace "None" with "your-username/gemma3n-e2b-children-storyteller"
5# once you upload the model.
6generator = pipeline("text-generation", model="Fedifehmi/gemma3n-e2b-children-storyteller", device="cuda")
7
8# Example 1: Asking a creative question
9question1 = "Tell me a short story about a brave little rabbit who wanted to fly."
10output1 = generator([{"role": "user", "content": question1}], max_new_tokens=200, return_full_text=False)[0]
11print("Story 1:\n", output1["generated_text"])
12
13# Example 2: Another creative prompt
14question2 = "Imagine a magical tree that grows candy. What kind of adventures happen near it?"
15output2 = generator([{"role": "user", "content": question2}], max_new_tokens=150, return_full_text=False)[0]
16print("\nStory 2:\n", output2["generated_text"])
17
18"""
19@misc{vonwerra2022trl,
20 title = {{TRL: Transformer Reinforcement Learning}},
21 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
22 year = 2020,
23 journal = {GitHub repository},
24 publisher = {GitHub},
25 howpublished = {\url{https://github.com/huggingface/trl}}
26}
27"""