{"id":23042540,"url":"https://github.com/daspartho/distillclassifier","last_synced_at":"2025-04-03T01:18:00.723Z","repository":{"id":199501076,"uuid":"702019605","full_name":"daspartho/DistillClassifier","owner":"daspartho","description":"Easily generate synthetic data for classification tasks using LLMs","archived":false,"fork":false,"pushed_at":"2023-11-07T15:34:52.000Z","size":1044,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T15:28:27.216Z","etag":null,"topics":["classification","classification-models","dataset-generation","distillation","distillation-model","distilling-the-knowledge","large-language-models","nlp","synthetic-data","synthetic-dataset-generation","text-classification"],"latest_commit_sha":null,"homepage":"","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/daspartho.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":"2023-10-08T09:04:23.000Z","updated_at":"2023-11-22T17:48:02.000Z","dependencies_parsed_at":"2023-12-16T08:43:39.185Z","dependency_job_id":"a1e82127-805d-4904-9a33-a6e976d9d6a2","html_url":"https://github.com/daspartho/DistillClassifier","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"2d0f46b9a0b981b9eaa80e90c552eb1d9e5d197f"},"previous_names":["daspartho/distillclassifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daspartho%2FDistillClassifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daspartho%2FDistillClassifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daspartho%2FDistillClassifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daspartho%2FDistillClassifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daspartho","download_url":"https://codeload.github.com/daspartho/DistillClassifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916763,"owners_count":20854514,"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":["classification","classification-models","dataset-generation","distillation","distillation-model","distilling-the-knowledge","large-language-models","nlp","synthetic-data","synthetic-dataset-generation","text-classification"],"created_at":"2024-12-15T20:33:05.288Z","updated_at":"2025-04-03T01:18:00.702Z","avatar_url":"https://github.com/daspartho.png","language":"Python","readme":"# DistillClassifier\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"150\" src=\"logo.png\"\u003e\n\u003c/p\u003e\n\n## About\nDistillClassifier is a tool built on top of [LLM-VM](https://github.com/anarchy-ai/LLM-VM) to easily generate synthetic data for classification tasks using LLMs for distilling LLM knowledge for classification task into much smaller and faster-to-run classification models. \n\nThis project was build for the ANARCHY October 2023 Hackathon. Checkout ANARCHY on their [github](https://github.com/anarchy-ai) and [website](https://anarchy.ai/welcome/why_anarchy).\n\n## Team Members:\n\n- [Partho Das](https://github.com/daspartho)\n- [Karan Janthe](https://github.com/kmj-007)\n\n## Setup\n\n### clone the project from github\n\n```bash\ngit clone https://github.com/daspartho/DistillClassifier\n```\n\n### `cd` into the project\n\n```bash\ncd DistillClassifier\n```\n\n### install LLM-VM\n\n```bash\ngit clone https://github.com/anarchy-ai/LLM-VM.git\ncd LLM-VM\npip3 install .\ncd ..\n```\n\n### install python dependencies\n\n```bash\npip3 install -r requirements.txt\n```\n\n### create an `.env` file and set OpenAI API key (if you want to use openai models) and Huggingface Hub Token (if you want to push the dataset to huggingface):\n\n```bash\nOPENAI_API_KEY=\nHF_HUB_TOKEN=\n```\n\n## Run\n\n### You can run the tool from command line like this:\n\n```bash\npython3 generation.py \u003ccolumns\u003e \u003cn_examples\u003e [-m \u003cmodel\u003e] [-f \u003cfilename\u003e] [-r \u003crepo\u003e]\n```\n\n### Arguments:\n\n- `\u003ccolumns\u003e`: Column information as a dictionary.\n- `\u003cn_examples\u003e`: Number of examples to be generated.\n- `-m, --model`: (Optional) Model name. Defaults to \"chat_gpt\".\n- `-f, --filename`: (Optional) Dataset filename. Defaults to \"dataset.json\".\n- `-r, --repo`: (Optional) HuggingFace repo ID\". Defaults to \"None\"\n\n### Example:\n\n```bash\npython3 generation.py '{\"text\": \"either spoiler or not spoiler text\", \"label\": \"if text is spoiler or not\"}' 25 -m 'chat_gpt' -f 'dataset.json' -r 'spoiler_or_not'\n```\n\n### or run the `demo.py` file directly:\n\n```bash\npython3 demo.py\n```\n\n### example output dataset:\n\n#### [demo_dataset.json](/demo_dataset.json)\n#### [demo dataset on huggingface](https://huggingface.co/datasets/daspartho/demo_dataset)\n\n\n### LICENSE\nMIT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaspartho%2Fdistillclassifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaspartho%2Fdistillclassifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaspartho%2Fdistillclassifier/lists"}