app(flowerhub): Add NanoGPT Shakespeare federated learning example#6630
Closed
zzsi wants to merge 7 commits intoflwrlabs:mainfrom
Closed
app(flowerhub): Add NanoGPT Shakespeare federated learning example#6630zzsi wants to merge 7 commits intoflwrlabs:mainfrom
zzsi wants to merge 7 commits intoflwrlabs:mainfrom
Conversation
Character-level language modeling with a baby GPT (~10.8M params) on the Tiny Shakespeare dataset. Supports both Simulation Engine and Deployment Engine modes. Uses FedAvg with server-side evaluation and text generation after training.
yan-gao-GY
previously approved these changes
Mar 2, 2026
Member
yan-gao-GY
left a comment
There was a problem hiding this comment.
Hi @zzsi Thank you for creating this PR — it looks great! I’ve just made a few minor formatting changes. Please feel free to create a Flower account and publish the app on Flower Hub. Thanks again for you contribution!
Author
|
@yan-gao-GY thanks, will do |
Member
|
This app has been published on Flower Hub - https://flower.ai/apps/zzsikungfu/nanogpt-shakespeare/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
train.bin/val.bindata)Details
The model is a "baby GPT" — small enough to train on CPU. Over 5 rounds with 2 simulated clients (50 steps each), validation perplexity drops from ~69 to ~12.4.
Test plan
flwr run .simulation (5 rounds, 2 clients, CPU)flwr app publishworkflow