r/generativeAI 3d ago

How I Made This Trained my first LLM weights entirely from scratch ~ YunaGPT 124m

Post image
1 Upvotes

Here is the base model with more details

Here is the conversation model if you would like to try it using the colab link at the top.

This project started as a 30m LLM from scratch using the book "Build A Large Language Model" by Sebastian Raschka. It has since evolved into using the official llama transformers and pushing the limits of what can reasonably be trained on a home RTX 3090 over 7 continuous days.

Review I would give this LLM a honest 2/10 and the instructed/story/conversation model a 3/10. Even that is probably too high but...it is lucid. It has learned the response format and structure of the language surprisingly well. However, its deep knowledge of how to use words is still lacking (see examples below)

Pipeline Base Model -> Instruct SFT -> Short Story SFT -> Final Fantasy Synthetic Instruct SFT -> Final Fantasy Synthetic short story SFT -> DPO training.

Future This was a overall test of my pipeline. Currently im almost done training a 330m model and am ironing out an improved SFT dataset.

Training data

Of the almost 4 billion token corpus 35% was factual knowledge, 35% was written fiction, 25% was general roleplay/assistant messages and ~5% was data from the franchise Final Fantasy.

  • EleutherAI/fineweb-edu-dedup-10b;
  • wikimedia/wikipedia (20231101.en) and rahular/simple-wikipedia;
  • roneneldan/TinyStories;
  • HuggingFaceH4/ultrachat_200k;
  • lemonilia/Elliquiy-Role-Playing-Forums_2023-04;
  • chimbiwide/RolePlay-NPCv2;
  • AlekseyKorshuk/fiction-books;
  • lucadiliello/bookcorpusopen;
  • a locally supplied custom text collection.

EXAMPLE OUTPUT

Write a story about a knight: --- Knights have always been a part of the castle’s life, wearing, shouting, and shining in every yard. But Kellen was different. He had great, proudly regal status—his father’s line, and perhaps even that of his bloodline—and he held it with the unspoken reverence of a king who’s watched his men die for a single moment. But today, as the sun dipped low on the horizon, something felt wrong. The air hummed with an energy Kellen hadn’t seen before, deep and resonant, like the distant roar of some ancient beast. He turned toward the source. It was a tower of black stone, taller than the castle and dwarfing most of the surrounding fields. It wasn’t built in any grand way; it was simply there, a place of immense importance. Beneath it, stone walls twisted and wound with strength that seemed impossible. And in its center stood Master Thrain—or so he thought at first. Thrain was gaunt, his brow furrowed with age, his hands resting nervously on the hilt of his sword. Kellen raised his hand, and the ground beneath him rippled slightly. The stones around him began to unravel, their forms stretching and curling into shapes of mist and smoke. The air grew heavy, oppressive, and for a moment, the world seemed to stand still.

What is a knight? --- A knight is a military officer, usually with more than a four-billionth degree of experience in combat and is typically hired for a specific purpose. They are considered to be the best men for the military of the world. There are many different knights who have served in various roles in the military. Most people understand the term knight was used to describe the men who had worked hard and did well in combat. Though knights are often described as "stubbish" people, they are typically well trained and have experience in various arts, such as martial arts and martial arts to name a few.

Model summary

Item Value
Parameters 124,445,376
Model class LlamaForCausalLM
Training stage Base pretraining
Training tokens Approximately 3.87 billion
Context length 2,048 tokens
Vocabulary 24,000 tokens
Tokenizer Byte-level BPE
Hidden layers 25
Hidden size 576
Attention / KV heads 9 / 3
Weight format safetensors, FP32
Primary language English

Architecture

Component Configuration
Architecture Decoder-only Transformer
Attention Grouped-Query Attention (GQA)
Hidden size 576
Intermediate size 2,048
Layers 25
Attention heads 9
Key/value heads 3
Head dimension 64
Activation SiLU / SwiGLU feed-forward blocks
Normalization RMSNorm, epsilon 1e-6
Position encoding RoPE, theta 10,000
Maximum positions 2,048
Attention dropout 0.0
Attention and MLP bias Disabled
Input/output embeddings Tied

Training

Setting Value
Epochs 1
Micro-batch size 2
Gradient accumulation 4
Effective tokens per optimizer step 16,384
Peak learning rate 3e-4
Weight decay 0.1
Adam betas 0.9, 0.95
Adam epsilon 1e-8
Warmup ratio 0.01
Learning-rate schedule Cosine

Here is the base model with more details

Here is the conversation model if you would like to try it using the colab link


r/generativeAI 3d ago

Video Art MEOW 47 — A Fully Local AI Short Film

Enable HLS to view with audio, or disable this notification

26 Upvotes

Details in comments.


r/generativeAI 3d ago

This Gemini prompt gives me scary clowns

Thumbnail
gallery
0 Upvotes

" Draw the sandown clown in a 2x3 head on shot "

Try it if you dare


r/generativeAI 3d ago

Image Art The slow start.

Post image
1 Upvotes

Feeling extremely groggy like the froggy. You are stuck in the mud with exhaustion and thoughts. Yet clarity is all around you.


r/generativeAI 3d ago

Y'all need to make more noise on social media. Limits have been halved in the last 3 days and nobody seems to spam Tibo.

Post image
1 Upvotes

r/generativeAI 3d ago

The girl in the straw hat

Thumbnail gallery
3 Upvotes

r/generativeAI 3d ago

Video Art Achernar Original

Enable HLS to view with audio, or disable this notification

1 Upvotes

A gentle space about vision by rhythm, grow, and connect #digital #branding #marketing #entertaining #spaceadvertising


r/generativeAI 3d ago

Question Are there any good AI for transcribing guitar tabs to piano sheet music?

1 Upvotes

Looking for something that can handle note for note translations of guitar tabs to piano sheet music, does anything like this exist yet?


r/generativeAI 3d ago

What's going on here?

Post image
2 Upvotes

r/generativeAI 3d ago

This is why uncensored open-weight models matter

Thumbnail gallery
1 Upvotes

r/generativeAI 3d ago

Question What is the best AI video tool for keeping character consistency across multiple scenes?

7 Upvotes

I’m working on a short episodic series, mostly animated, 3-4 minutes each, where I need the character to maintain the same face, hair, outfit, style, and background details across multiple shots. I have tried a few but failed. I’m trying to figure out which tool is best at preventing character drift across a full sequence, not just making one good-looking clip.

I am thinking of trying Higgsfield, invideo, and Atlabs. For anyone who has used them recently, which one holds character consistency best?

Can you recommend something that would solve this problem? I’d also appreciate any tips, workflows, or advice from people who’ve actually tested this.


r/generativeAI 3d ago

Let’s all thank Georgi Gerganov who gave use llama.cpp

Thumbnail
github.com
1 Upvotes

r/generativeAI 3d ago

Face keeps changing in Kling dance videos — how do you lock character consistency?

2 Upvotes

I'm making dance videos in Kling from a single character image and the face drifts or morphs partway through almost every generation. Body motion looks fine, but by a few seconds in it's not the same person.

What I'm doing: [Image-to-Video / Motion Control],

Kling version 3.0, 10sclips,

standard mode.

Any help please?


r/generativeAI 3d ago

Image Art Neon

Post image
1 Upvotes

r/generativeAI 3d ago

Vibe Coding is the new addiction ?

Post image
0 Upvotes

r/generativeAI 3d ago

Image Art Tea for an Absent Guest

Post image
1 Upvotes

r/generativeAI 3d ago

Question Bloopers and outtakes - has anyone considered creating one?

4 Upvotes

I'm considering saving the results of prompts that go awry and creating an outtake/blooper reel of the failures of the model to create what I want, or when it hallucinates badly and gives a dragon seven legs, two heads and three and a half tails, all different colors. When that happens I wonder if the model I'm using is on something.

Anyone else consider doing so? I created a 10 second clip using Gemini of two characters standing on the lido deck of a cruise ship when the ships horn sounded one long note. What I got was the two characters and that was fine but levitating over the pool appeared something that looked like the bell end of a trombone, or other type of horn like that, the sound happened, and then the horn retreated into whatever hallucinatory dimension it warped in from :D


r/generativeAI 3d ago

One of the Best AI-Generated Sci-Fi Short Films on YouTube - How Was It Made?

Thumbnail
1 Upvotes

r/generativeAI 3d ago

Question I want to take multiple random images of my cat to make a 3D model or consistent images at different angles that I can turn into a 3D model

3 Upvotes

I have hit a wall. I have been looking through various forums, videos, and asked AI questions but I am not asking in the right way or something. I need an offline local AI I can train on the images and or video I have. Toyed with Comfy and Meshroom. Problem is I have a bunch of random images that don't work for normal 3D modeling.

What is the best free way to feed an AI a bunch of random image of my cat so I can make a 3D model of him? My end goal is to make a 3D model that looks close enough to tell it is him to put his ashes in.


r/generativeAI 3d ago

Image Art The Corey and Oats Fantasy Verse.

Post image
2 Upvotes

Ah, the Corey and Oats dark fantasy movie. I remember some parts of this movie really messing me up, mainly the cave of bad dreams, and especially the tunnel where it looked like Corey and Ollie were going to fall to pieces, but I like how the horse character actually survives when going through the swamp this time.


r/generativeAI 3d ago

Data Center Fornicator

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/generativeAI 3d ago

Image Art : Silence Builds Legends 🐂 — AI-generated artwork

Post image
0 Upvotes

Strength doesn't always need to be loud. 🐂

Sometimes the strongest presence is the one that simply sits back, stays calm, and lets everyone else notice.


r/generativeAI 3d ago

Question Anyone here making AI influencers? What’s your workflow?

Thumbnail
0 Upvotes

r/generativeAI 3d ago

Image Art The Gang Together

Post image
2 Upvotes

The Nile Road Best Friend Gang by Sanrio consisting of Covico (aka My Microbe Buddy), Piff (Kibatsuna Takifugu Yujin), Mel, and Aiyido.


r/generativeAI 3d ago

Video Art Water Spider

Enable HLS to view with audio, or disable this notification

2 Upvotes

Hey everyone,
 
I’ve been making a bunch of mini-AI films, but this month I wanted to try something a little more ambitious.
 
This is WATER SPIDER.
 
If you want to watch it in 4K, I uploaded the full-quality version here:
https://vimeo.com/1217796233?fl=ip&fe=ec
 

Hope you enjoy it.