Add inference script + merge script + README section: run without downloading GPT-2 blocks each time
This adds two ready-to-run scripts plus a README section:
inference_no_gpt2_blocks.pyβ generates text using only GPT-2's
embeddings / final LayerNorm / LM head, never calling GPT-2's own
12 transformer blocks (gpt2.transformer.h). All layer computation
comes from this repo's trained SharedLayerReconstructor.merge_gpt2_into_homegpt.pyβ goes one step further and bakes GPT-2's
embeddings / final LayerNorm / LM head weights directly into a new
self-contained checkpoint alongside the reconstructor, saved to./homeGPT-merged. After the first run, no separate GPT-2 download ortrust_remote_codeprompt is needed to generate text.
Changes:
- Add
inference_no_gpt2_blocks.py - Add
merge_gpt2_into_homegpt.py - Append two sections to README.md documenting both scripts
Usage:
python inference_no_gpt2_blocks.py --prompt "Your prompt here"
python merge_gpt2_into_homegpt.py --prompt "Your prompt here"