Run this model with HF Jobs

Run Akash-nath29/tinyllamashakespeare on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Akash-nath29/tinyllamashakespeare. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Akash-nath29/tinyllamashakespeare on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Akash-nath29/tinyllamashakespeare. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Akash-nath29/tinyllamashakespeare. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

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
13
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
(587)
this model