{"id":19816933,"url":"https://github.com/flyingfathead/gpt2-tensorflow-localchat","last_synced_at":"2026-06-08T18:31:41.348Z","repository":{"id":236832125,"uuid":"793235077","full_name":"FlyingFathead/gpt2-tensorflow-localchat","owner":"FlyingFathead","description":"A simple CLI chat mode framework for local GPT-2 Tensorflow models","archived":false,"fork":false,"pushed_at":"2024-05-29T11:33:59.000Z","size":35,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-20T09:37:03.671Z","etag":null,"topics":["cli","gpt-2","gpt-2-chatbot","gpt-2-model","gpt-2-text-generation","gpt2","python"],"latest_commit_sha":null,"homepage":"https://github.com/FlyingFathead/gpt2-tensorflow-localchat","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlyingFathead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-28T19:42:36.000Z","updated_at":"2024-07-24T21:57:22.000Z","dependencies_parsed_at":"2024-04-29T20:45:53.770Z","dependency_job_id":"f6cdcd1b-4252-4116-b5e6-d85e5d8dca68","html_url":"https://github.com/FlyingFathead/gpt2-tensorflow-localchat","commit_stats":null,"previous_names":["flyingfathead/gpt2-tensorflow-localchat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FlyingFathead/gpt2-tensorflow-localchat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2Fgpt2-tensorflow-localchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2Fgpt2-tensorflow-localchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2Fgpt2-tensorflow-localchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2Fgpt2-tensorflow-localchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlyingFathead","download_url":"https://codeload.github.com/FlyingFathead/gpt2-tensorflow-localchat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2Fgpt2-tensorflow-localchat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34075954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gpt-2","gpt-2-chatbot","gpt-2-model","gpt-2-text-generation","gpt2","python"],"created_at":"2024-11-12T10:11:07.110Z","updated_at":"2026-06-08T18:31:41.331Z","avatar_url":"https://github.com/FlyingFathead.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpt2-tensorflow-localchat\n\n`gpt2-tensorflow-localchat` is a simple CLI chat mode framework for Python, built for locally running GPT-2 models with TensorFlow. This tool provides an easy way to interact with GPT-2 models and fine-tune them on custom data sets or use them for unique, real-time applications.\n\n## Project Repository\nExplore more about this project and its developments on GitHub: [gpt2-tensorflow-localchat](https://github.com/FlyingFathead/gpt2-tensorflow-localchat)\n\n## Features\n- CLI-based interaction with GPT-2 models.\n- Local deployment of TensorFlow models for privacy and control.\n- Support for multiple command scripts to demonstrate various capabilities.\n\n## Directory Structure\n```\n├── .gitignore\n├── README.md\n└── src/\n    ├── Model-Battle.py          # Battle between models: experimental feature\n    ├── Model-Localtalk.py       # Main script for local chat interactions\n    ├── encoder.py               # Manages text encoding and decoding\n    ├── model.py                 # Core TensorFlow model definitions\n    ├── olddemo.py               # Old demonstration scripts for reference\n    ├── sample.py                # Sampling utilities for generating text\n    └── start_localtalk.sh       # Script to start local chat environment(*)\n```\n_(*) The purpose of the bash script is to suppress Tensorflow's output from interfering in the CLI output._\n\n## Getting Started\n\n### Prerequisites\n- Python 3.x\n- TensorFlow 1.15 or higher (with `compat.v1` API support)\n- An environment supporting bash scripts (Linux/Unix)\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/FlyingFathead/gpt2-tensorflow-localchat.git\n   ```\n2. Navigate into the project directory:\n   ```bash\n   cd gpt2-tensorflow-localchat\n   ```\n3. Install required Python libraries:\n   ```bash\n   pip install -r requirements.txt\n   ```\n_(Note: `requirements.txt` currently not added in yet. Use your own local TF model files.)_\n\n### Usage\nTo start a local chat with the model:\n```bash\n./src/start_localtalk.sh\n```\nThis script sets the appropriate TensorFlow logging level and starts an interactive chat session using `Model-Localtalk.py`.\n\n## Changes\n- `v0.17` - local chat now uses `GPUtil` to look for the best available CUDA GPU\n- `v0.16` - `/clear` to clear out the context memory\n- `v0.15` - bugfixes, `/swap` for role-swapping between user and the model\n- `v0.10` - initial commit\n\n## Contributing\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n## License\nDistributed under the MIT License. See `LICENSE` for more information. Parts of the model loading code has been forked from [OpenAI's GPT-2 source code](https://github.com/openai/gpt-2).\n\n## Contact\n- Project Link: [https://github.com/FlyingFathead/gpt2-tensorflow-localchat](https://github.com/FlyingFathead/gpt2-tensorflow-localchat)\n- Project Creator: [Flyingfathead on GitHub](https://github.com/FlyingFathead/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingfathead%2Fgpt2-tensorflow-localchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyingfathead%2Fgpt2-tensorflow-localchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingfathead%2Fgpt2-tensorflow-localchat/lists"}