{"id":13535236,"url":"https://github.com/voidful/BertGenerate","last_synced_at":"2025-04-02T00:32:59.379Z","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":38,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T08:10:03.043Z","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":"2024-06-04T10:38:14.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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222788514,"owners_count":17037777,"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","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-08-01T08:00:51.726Z","updated_at":"2024-11-02T23:31:10.493Z","avatar_url":"https://github.com/voidful.png","language":"Jupyter Notebook","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 ","funding_links":[],"categories":["BERT Text Generation Task:"],"sub_categories":[],"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"}