| --- |
| license: apache-2.0 |
| language: |
| - en |
| tags: |
| - unsloth |
| - gemma |
| - conversational |
| - dungeons-and-dragons |
| pipeline_tag: text-generation |
| base_model: unsloth/gemma-3-4b-it |
| model_type: gemma |
| --- |
| |
| # Gemma-3-DnD (fine-tuned) |
|
|
| This model is a Gemma 3.88B parameter model fine-tuned specifically on Dungeons & Dragons content, including the Basic Rules and the Curse of Strahd campaign, using the [Unsloth](https://unsloth.ai/) fine-tuning framework. |
|
|
| ## Model Details |
| - **Base Model**: [Gemma-3-4b-it](https://huggingface.co/unsloth/gemma-3-4b-it) |
| - **Fine-tuning**: LoRA fine-tuning using Unsloth |
| - **Content**: D&D Basic Rules, Curse of Strahd, and related content. |
|
|
| ## Usage Example |
|
|
| You can load the model easily with the Hugging Face Transformers library: |
|
|
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer |
| import torch |
| |
| model_name = "YFolla/gemma-3-dnd" |
| model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto") |
| tokenizer = AutoTokenizer.from_pretrained(model_name) |
| |
| prompt = "What are the core mechanics of Dungeons & Dragons?" |
| |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) |
| streamer = TextStreamer(tokenizer) |
| |
| output = model.generate(**inputs, max_new_tokens=100, streamer=streamer) |