{"id":13535059,"url":"https://github.com/kevinmtian/distill-bert","last_synced_at":"2025-04-02T00:32:09.919Z","repository":{"id":92004046,"uuid":"171736542","full_name":"kevinmtian/distill-bert","owner":"kevinmtian","description":"Knowledge Distillation from BERT","archived":false,"fork":false,"pushed_at":"2019-01-07T20:05:11.000Z","size":30,"stargazers_count":51,"open_issues_count":0,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-02T23:32:10.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinmtian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-20T19:32:49.000Z","updated_at":"2024-04-20T00:22:56.000Z","dependencies_parsed_at":"2024-01-14T02:36:36.366Z","dependency_job_id":"753133f0-1938-421c-8e16-2a2192b4b079","html_url":"https://github.com/kevinmtian/distill-bert","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/kevinmtian%2Fdistill-bert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmtian%2Fdistill-bert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmtian%2Fdistill-bert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmtian%2Fdistill-bert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinmtian","download_url":"https://codeload.github.com/kevinmtian/distill-bert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735260,"owners_count":20825218,"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:49.198Z","updated_at":"2025-04-02T00:32:09.520Z","avatar_url":"https://github.com/kevinmtian.png","language":"Python","funding_links":[],"categories":["BERT Deploy Tricks:"],"sub_categories":[],"readme":"\n# Distilled BERT\n\nThis work aims Knowledge Distillation from [Google BERT model](https://github.com/google-research/bert) to compact Convolutional Models. (Not done yet)\n\n\n## Requirements\n\nPython \u003e 3.6, fire, tqdm, tensorboardx, \ntensorflow (for loading checkpoint file)\n\n## Example Usage\n\n### Fine-tuning (MRPC) Classifier with Pre-trained Transformer\n\nDownload [BERT-Base, Uncased](https://storage.googleapis.com/bert_models/2018_10_18/uncased_L-12_H-768_A-12.zip) and\n[GLUE Benchmark Datasets]( https://github.com/nyu-mll/GLUE-baselines) \nbefore fine-tuning.\n* make sure that \"total_steps\" in train.json should be greater than n_epochs*(num_data/batch_size)\n\nModify several config json files before following commands for training and evaluating.\n```\npython finetune.py config/finetune/mrpc/train.json\npython finetune.py config/finetune/mrpc/eval.json\n```\n\n### Training Blend CNN from scratch\n\nSee [Transformer to CNN](https://openreview.net/forum?id=HJxM3hftiX).\nModify several config json files before following commands for training and evaluating.\n```\npython classify.py config/blendcnn/mrpc/train.json\npython classify.py config/blendcnn/mrpc/eval.json\n```\n\n### Knowledge Distillation from finetuned Transformer to CNN\n\nModify several config json files before following commands for training and evaluating.\n```\npython distill.py config/distill/mrpc/train.json\npython distill.py config/distill/mrpc/eval.json\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinmtian%2Fdistill-bert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinmtian%2Fdistill-bert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinmtian%2Fdistill-bert/lists"}