GPT-2 fine-tune for generating nonexistent words, definitions, and examples
Top 37.3% on sourcepulse
This project enables users to train a GPT-2 variant to generate novel words, definitions, and example sentences from scratch. It's designed for researchers and developers interested in creative language generation and exploring the capabilities of fine-tuned language models. The primary benefit is the ability to create a unique lexicon and associated meanings.
How It Works
The project utilizes a GPT-2 architecture fine-tuned on a custom dataset of words and definitions. It employs a "forward model" to generate definitions for new words and an "inverse model" to create words from given definitions. This dual-model approach allows for flexible and creative text generation, enabling the creation of entirely new linguistic concepts.
Quick Start & Requirements
cpu_deploy_environment.yml
.blacklist.pickle.gz
, forward-dictionary-model-v1.tar.gz
, and inverse-dictionary-model-v1.tar.gz
.from title_maker_pro.word_generator import WordGenerator
word_generator = WordGenerator(
device="cpu",
forward_model_path="path/to/forward-dictionary-model-v1.tar.gz",
inverse_model_path="path/to/inverse-dictionary-model-v1.tar.gz",
blacklist_path="path/to/blacklist.pickle.gz",
quantize=False,
)
print(word_generator.generate_word())
print(word_generator.generate_definition("glooberyblipboop"))
print(word_generator.generate_word_from_definition("a word that does not exist"))
Highlighted Details
aiohttp-devtools
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is described as a "variant of GPT-2," suggesting it may not use the latest GPT architectures. The README does not specify the exact GPT-2 version or fine-tuning details. The lack of a clear license is a significant caveat for adoption.
3 years ago
Inactive