{"id":26783655,"url":"https://github.com/isaacus-dev/emubert-creator","last_synced_at":"2026-01-07T16:48:21.614Z","repository":{"id":239708577,"uuid":"799467530","full_name":"isaacus-dev/emubert-creator","owner":"isaacus-dev","description":"The training code behind EmuBert, the largest open-source masked language model for Australian law.","archived":false,"fork":false,"pushed_at":"2024-06-02T11:22:19.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T04:25:03.792Z","etag":null,"topics":["australia","bert","law","legal","llm","llms","model","models","nlp","training","transformers"],"latest_commit_sha":null,"homepage":"https://huggingface.co/umarbutler/emubert","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaacus-dev.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-05-12T08:31:41.000Z","updated_at":"2025-01-21T08:54:09.000Z","dependencies_parsed_at":"2024-05-14T07:28:08.969Z","dependency_job_id":"4e3435d6-ba7a-4dd6-8eb0-40dd71c30617","html_url":"https://github.com/isaacus-dev/emubert-creator","commit_stats":null,"previous_names":["umarbutler/emubert-creator","isaacus-dev/emubert-creator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacus-dev%2Femubert-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacus-dev%2Femubert-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacus-dev%2Femubert-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacus-dev%2Femubert-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacus-dev","download_url":"https://codeload.github.com/isaacus-dev/emubert-creator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168086,"owners_count":20734389,"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":["australia","bert","law","legal","llm","llms","model","models","nlp","training","transformers"],"created_at":"2025-03-29T09:45:17.417Z","updated_at":"2026-01-07T16:48:16.585Z","avatar_url":"https://github.com/isaacus-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EmuBert Creator\nEmuBert is the largest open-source masked language model for Australian law. This repository preserves the code used to create EmuBert.\n\nIf you're looking to download EmuBert, you may do so on [Hugging Face](https://huggingface.co/umarbutler/emubert).\n\n## Setup 🛠️\nThe EmuBert Creator has only been tested on Python 3.11 but should work for later versions and *may* also work for earlier versions.\n\nTo set up the Creator, start by running the following commands:\n```bash\ngit clone https://github.com/umarbutler/emubert-creator.git\ncd emubert-creator\npip install -r requirements.txt\n```\n\nNext, download the version of the [Open Australian Legal Corpus](https://huggingface.co/datasets/umarbutler/open-australian-legal-corpus) you'd like to train EmuBert on by navigating to its [changelog](https://huggingface.co/datasets/umarbutler/open-australian-legal-corpus/blob/main/CHANGELOG.md), clicking on the version number you'd like to use, clicking on the file named `corpus.jsonl` and finally hitting 'download'. Any version of the Corpus that begins with the number 4 should be compatible with the Creator. The specific version of the Corpus used to produce EmuBert is 4.2.1 and can be downloaded [here](https://huggingface.co/datasets/umarbutler/open-australian-legal-corpus/blob/fe0cd918dbe0a1fb5afe09cfa682ec3dbc1b94ca/corpus.jsonl).\n\nFinally, you can either place the Corpus in a directory named `data` in the root of the repository, define an environment variable named `OALC` that points to the Corpus or override the `corpus_path` variable in `scripts/config.py`.\n\n## Usage 👩‍💻\nTo train EmuBert, run the following scripts in the `scripts` directory in order:\n1. `preprocess.py`, which cleans documents, splits them into training, validation and test sets, filters out short documents from the training set, deduplicates the training set, trains a tokeniser and finally save the resulting data.\n2. `block.py`, which splits texts into block of the same size as EmuBert's context window and saves them.\n3. `train.py`, which trains EmuBert and saves it to a directory named `model` (unless the `model_dir` variable in `config.py` is overridden). If training is interrupted at any point, set the script's `RESUME` variable to `True`.\n4. `convert.py`, which converts EmuBert from a Better Transformer into a vanilla Transformer.\n5. `benchmark.py`, which benchmarks EmuBert against other popular masked language models.\n\n## Licence 📜\nThe Creator is licensed under the [MIT License](LICENCE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacus-dev%2Femubert-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacus-dev%2Femubert-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacus-dev%2Femubert-creator/lists"}