{"id":23725981,"url":"https://github.com/voidful/bertgenerate","last_synced_at":"2025-09-04T02:31:24.106Z","repository":{"id":109431067,"uuid":"179675979","full_name":"voidful/BertGenerate","owner":"voidful","description":"Fine tuning bert for text generation","archived":false,"fork":false,"pushed_at":"2019-11-09T10:55:55.000Z","size":25,"stargazers_count":37,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T00:37:15.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/voidful.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}},"created_at":"2019-04-05T12:18:59.000Z","updated_at":"2025-01-17T12:53:27.000Z","dependencies_parsed_at":"2023-03-22T09:33:39.339Z","dependency_job_id":null,"html_url":"https://github.com/voidful/BertGenerate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/voidful/BertGenerate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2FBertGenerate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2FBertGenerate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2FBertGenerate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2FBertGenerate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidful","download_url":"https://codeload.github.com/voidful/BertGenerate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2FBertGenerate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273541903,"owners_count":25124056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":[],"created_at":"2024-12-31T00:18:06.420Z","updated_at":"2025-09-04T02:31:23.881Z","avatar_url":"https://github.com/voidful.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Experiment Code for bert generate\r\nBert 做 文本生成 的一些實驗  \r\n\r\nHow bert perform on text generation ?    \r\nHere is a POC try it in three different finetuning ways  \r\n- Generate result one by one word\r\n- Generate result one time\r\n- Generate from LSTM\r\n\r\n### Colab Address  \r\n``` \r\nhttps://colab.research.google.com/drive/19wgXJPdb_282M0_puMgQ8qid0jvmJghG\r\n```\r\n\r\n### Detail  \r\nLike a Seq2Seq task, input a sentence out a sentence\r\n### ONEBYONE\r\n#### Input  \r\n```text\r\nStep 1. [CLS] I go to school by bus [SEP] [MASK]\r\nStep 2. [CLS] I go to school by bus [SEP] 我[MASK]\r\nStep 3. [CLS] I go to school by bus [SEP] 我搭[MASK]\r\nStep 4. [CLS] I go to school by bus [SEP] 我搭公[MASK]\r\nStep 5. [CLS] I go to school by bus [SEP] 我搭公車[MASK]\r\nStep 6. [CLS] I go to school by bus [SEP] 我搭公車上[MASK]\r\nStep 7. [CLS] I go to school by bus [SEP] 我搭公車上學[MASK]\r\n```\r\n#### Output  \r\n```text\r\nStep 1.  \r\nStep 2.  我\r\nStep 3.  搭\r\nStep 4.  公\r\nStep 5.  車\r\nStep 6.  上\r\nStep 7.  學\r\nStep 8.  [SEP]\r\n```\r\n#### Loss Calculate\r\n```\r\n['[CLS]', 'i', 'go', 'to', 'school', 'by', 'bus', '[SEP]', '[MASK]']\r\n[-1, -1, -1, -1, -1, -1, -1, -1, 2769] \r\n```\r\n\r\n### ONCE\r\n#### Input  \r\n```text\r\nStep 1. [CLS] I go to school by bus [SEP] [MASK][MASK][MASK][MASK][MASK][MASK][MASK]...[MASK]\r\n```\r\n#### Output  \r\n```text\r\nStep 1.  我搭公車上學[SEP]-1-1-1....-1\r\n```\r\n#### Loss Calculate\r\n```\r\n['[CLS]', 'i', 'go', 'to', 'school', 'by', 'bus', '[SEP]', '[MASK]']\r\n[-1, -1, -1, -1, -1, -1, -1, -1, 2769] \r\n```\r\n```\r\n['[CLS]', 'i', 'go', 'to', 'school', 'by', 'bus', '[SEP]', '[MASK]', '[MASK]', '[MASK]', '[MASK]', '[MASK]', '[MASK]', '[MASK]', '[MASK]'..... '[MASK]']\r\n[ -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1, 2769, 3022, 1062, 6722, 677, 2119,  102,   -1,   -1, .... ,-1] \r\n```\r\n\r\n### ONCE in LSTM   \r\nSame as ONCE ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidful%2Fbertgenerate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidful%2Fbertgenerate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidful%2Fbertgenerate/lists"}