{"id":16930395,"url":"https://github.com/ayaka14732/bart-base-cantonese","last_synced_at":"2025-04-11T16:31:16.992Z","repository":{"id":108216038,"uuid":"562511097","full_name":"ayaka14732/bart-base-cantonese","owner":"ayaka14732","description":"The pre-trained Cantonese BART model","archived":false,"fork":false,"pushed_at":"2022-11-06T15:37:42.000Z","size":268,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"2nd-stage-pre-train","last_synced_at":"2025-03-25T15:50:13.996Z","etag":null,"topics":["bart","cantonese","huggingface","nlp","pre-trained-model","transformer"],"latest_commit_sha":null,"homepage":"https://huggingface.co/Ayaka/bart-base-cantonese","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/ayaka14732.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":"2022-11-06T15:32:47.000Z","updated_at":"2024-11-03T04:41:53.000Z","dependencies_parsed_at":"2024-04-21T04:47:06.649Z","dependency_job_id":null,"html_url":"https://github.com/ayaka14732/bart-base-cantonese","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/ayaka14732%2Fbart-base-cantonese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaka14732%2Fbart-base-cantonese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaka14732%2Fbart-base-cantonese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayaka14732%2Fbart-base-cantonese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayaka14732","download_url":"https://codeload.github.com/ayaka14732/bart-base-cantonese/tar.gz/refs/heads/2nd-stage-pre-train","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441225,"owners_count":21103947,"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":["bart","cantonese","huggingface","nlp","pre-trained-model","transformer"],"created_at":"2024-10-13T20:41:37.400Z","updated_at":"2025-04-11T16:31:16.715Z","avatar_url":"https://github.com/ayaka14732.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BART Base Cantonese\n\nThis is the Cantonese model of BART base. It is obtained by a second-stage pre-training on the [LIHKG dataset](https://github.com/ayaka14732/lihkg-scraper) based on the [fnlp/bart-base-chinese](https://huggingface.co/fnlp/bart-base-chinese) model.\n\nThis project is supported by Cloud TPUs from Google's [TPU Research Cloud](https://sites.research.google/trc/about/) (TRC).\n\n## Usage\n\n```python\nfrom transformers import BertTokenizer, BartForConditionalGeneration, Text2TextGenerationPipeline\ntokenizer = BertTokenizer.from_pretrained('Ayaka/bart-base-cantonese')\nmodel = BartForConditionalGeneration.from_pretrained('Ayaka/bart-base-cantonese')\ntext2text_generator = Text2TextGenerationPipeline(model, tokenizer)  \noutput = text2text_generator('聽日就要返香港，我激動到[MASK]唔着', max_length=50, do_sample=False)\nprint(output[0]['generated_text'].replace(' ', ''))\n# output: 聽日就要返香港，我激動到瞓唔着\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayaka14732%2Fbart-base-cantonese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayaka14732%2Fbart-base-cantonese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayaka14732%2Fbart-base-cantonese/lists"}