{"id":20597075,"url":"https://github.com/tradle/chunkk","last_synced_at":"2026-03-10T06:33:16.199Z","repository":{"id":152402891,"uuid":"625666705","full_name":"tradle/chunkk","owner":"tradle","description":"recursive dataset gen for finetuning pre-trained GPT models from large text","archived":false,"fork":false,"pushed_at":"2023-04-17T18:04:33.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T23:52:20.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tradle.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":"2023-04-09T20:13:20.000Z","updated_at":"2024-02-17T10:48:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"4047d58c-82d1-45a5-bed1-5f611e8e2269","html_url":"https://github.com/tradle/chunkk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tradle/chunkk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fchunkk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fchunkk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fchunkk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fchunkk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tradle","download_url":"https://codeload.github.com/tradle/chunkk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fchunkk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30326891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-16T08:20:08.878Z","updated_at":"2026-03-10T06:33:16.170Z","avatar_url":"https://github.com/tradle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chunkk\nRecursively generating a dataset for finetuning pre-trained GPT models from a large text file, like a book or a documentation\n\n## Usage\n```\nnode --input [inputFilePath] --output [outputFilePath] --numIterations [number] --numTokens [number] --model [chatGptModel]\n```\nor\n```\nnode -i [inputFilePath] -o [outputFilePath] -n [number] -t [number] --m [chatGptModel]\n```\n**input** _(requred)_ - the file path for `txt` (for example a book, or a documentation)  \n**output** - file path for the generated JSON file // default output.json  \n**numIterations** - how many times you want to ask for questions for each chunk // default 3  \n**numTokens** - max number of tokens for ChatGPT model of your choice // default 2000  \n**model** - ChatGPT model // default **gpt-3.5-turbo**\n\n#### Example\n```\nnode index.js --input '../Downloads/TedChiang-The truth of fact the truth of feeling.txt' --numIterations 5 --output '../Downloads/Ted.json' --numTokens 2500 --model 'gpt-4'\n```\n\n### Here is how it works\n- Takes a big text file\n- Splits it in `numberTokens` chunks\n- For each chunk:\n   - Ask GPT to create a set of questions. The same request repeated in total `numberOfIterations` times. Every request returns about 8-10 question. So the number of questions will be about `numberOfIterations * 10`\n   - All these questions are then fed as a prompt to ChatGPT for answers.\n   - The last request is a summary for this chunk of text\n- Summaries are concatenated into a new text, and the process repeats recursively until just one chunk is left\n- All questions, answers and summaries are recorded in JSON format in file **outputFile** unless you specified the\n\n## TODO\n- Add streamining. This is not going to work for huge files for now, since the reading of the file is done with fs.readFileSync\n- Add quizzes. \n\n\n#\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fchunkk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftradle%2Fchunkk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fchunkk/lists"}