Aayush Bankar
S–09

Fine-Tuned NLP Text Generation

Edge AI & Pipelines

Model Published

Kafka Story Generator

Autoregressive GPT-2 Fine-Tuned on Kafka Corpus

A fine-tuned language generation model trained on the complete literary works of Franz Kafka, packaged with an interactive web generation interface and hosted on the Hugging Face Model Hub (bankar404/kafka-gpt2-story-generator).

Architectural Plate // Kafka Story GeneratorHardware Telemetry & Dataflow
Kafka Story Generator Visual Architectural Plate
01

Hardware-Verified Benchmarks

Hugging Face Hub

Model Registry

Public weights published at bankar404/kafka-gpt2-story-generator

GPT-2 (124M)

Base Architecture

12-layer decoder-only transformer with 768 hidden dimensions

< 850 ms

Inference Latency

Generates 120 tokens on CPU / <150ms on GPU hardware

Top-k & Top-p

Sampling Controls

Adjustable temperature, nucleus sampling, and presence penalty

100% Curated

Corpus Quality

Text deduplication, custom sentence boundary tokens, and cleaning

Web & API

Deployment

Interactive Flask generator portal with REST API endpoints

02

Technical Specification Sheet

FrameworksPyTorch, Hugging Face Transformers, Datasets
Model IDbankar404/kafka-gpt2-story-generator
Base Checkpointgpt2 (124M parameters, 12 attention heads)
Training DatasetFull public domain bibliography of Franz Kafka
Loss FunctionCross-Entropy Loss with Label Smoothing
Inference EngineHugging Face pipeline + Flask web server

ARCArchitectural Overview

Engineering Architecture

Engineered to study stylistic transfer and autoregressive token probability distributions in domain-specific literary corpora. The model was trained by fine-tuning GPT-2 using PyTorch and Hugging Face Transformers on cleaned, tokenized German and English translations of Kafka classics (The Metamorphosis, The Trial, The Castle). The inference interface incorporates temperature scaling, top-k sampling, and repetition penalties to reproduce authentic thematic motifs without mode collapse.

Key Technical Innovations:

  • ›Published open model weights available on the Hugging Face community repository.
  • ›Faithful capture of Kafkaesque bureaucratic absurdity and existential syntax.
  • ›Lightweight local deployment runnable entirely on standard CPU laptops.

VFDGround-Truth Verification

Empirical Test Record

Model checkpoints verified on Hugging Face Model Hub and evaluated with automated perplexity metrics.

PythonPyTorchTransformersHugging FaceNLPFlask