TinyLlama Shakespeare Chatbot

A conversational AI that speaks in authentic Shakespearean English.

Model Description

Fine-tuned on Shakespeare's complete works (42,000+ lines) transformed into 8,000+ chat-style training examples.

Capabilities:

  • Compose sonnets on any topic
  • Engage in dramatic dialogue
  • Respond in Shakespearean style
  • Generate poetry and monologues

This is a MERGED model - works directly with transformers, no PEFT needed!

Usage

`python from transformers import AutoModelForCausalLM, AutoTokenizer import torch

model = AutoModelForCausalLM.from_pretrained( "Akash-nath29/tinyllamashakespeare", torch_dtype=torch.float16, device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("Akash-nath29/tinyllamashakespeare")

Generate text

inputs = tokenizer("To be or not to be", return_tensors="pt") outputs = model.generate(**inputs, max_length=200) print(tokenizer.decode(outputs[0])) `

Training Details

Parameter Value
Base Model TinyLlama-1.1B-Chat-v1.0
Method LoRA + QLoRA (4-bit)
LoRA Rank 16
LoRA Alpha 32
Target Modules q_proj, k_proj, v_proj, o_proj
Training Examples 8,000+ conversations
Max Length 512 tokens
Epochs 3

Hardware

  • GPU: NVIDIA GeForce RTX 3050 Laptop GPU
  • Training Time: ~4 hours

Developed By

Akash Nath

Repository

GitHub - TinyLlamaShakespeare

License

MIT License

Downloads last month
12
Safetensors
Model size
1B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Akash-nath29/tinyllamashakespeare

Finetuned
(486)
this model