{"id":13932134,"url":"https://github.com/myshell-ai/JetMoE","last_synced_at":"2025-07-19T16:30:58.127Z","repository":{"id":231162823,"uuid":"780713459","full_name":"myshell-ai/JetMoE","owner":"myshell-ai","description":"Reaching LLaMA2 Performance with 0.1M Dollars","archived":false,"fork":false,"pushed_at":"2024-04-04T15:48:28.000Z","size":2269,"stargazers_count":72,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-04T19:55:30.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"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/myshell-ai.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,"dei":null}},"created_at":"2024-04-02T02:43:16.000Z","updated_at":"2024-04-15T04:52:57.730Z","dependencies_parsed_at":null,"dependency_job_id":"b1c060b0-8c5f-4fbe-8d73-d5af78f9174a","html_url":"https://github.com/myshell-ai/JetMoE","commit_stats":null,"previous_names":["myshell-ai/jetmoe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myshell-ai%2FJetMoE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myshell-ai%2FJetMoE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myshell-ai%2FJetMoE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myshell-ai%2FJetMoE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myshell-ai","download_url":"https://codeload.github.com/myshell-ai/JetMoE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226635602,"owners_count":17662053,"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-07T21:00:49.797Z","updated_at":"2024-11-26T22:31:10.455Z","avatar_url":"https://github.com/myshell-ai.png","language":"Python","funding_links":[],"categories":["Repos","Python"],"sub_categories":[],"readme":"# JetMoE: Reaching LLaMA2 Performance with 0.1M Dollars\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv\u003e\u0026nbsp;\u003c/div\u003e\n  \u003cimg src=\"https://github.com/myshell-ai/JetMoE/assets/40556743/202f61a4-f2fa-4983-bcda-027478139e00\" width=\"500\"/\u003e \n  \u003cimg src=\"resources/2-performance.png\" width=\"530\"/\u003e \n\u003c/div\u003e\n\n## Key Messages\n\n1. JetMoE-8B is **trained with less than $ 0.1 million**\u003csup\u003e1\u003c/sup\u003e **cost but outperforms LLaMA2-7B from Meta AI**, who has multi-billion-dollar training resources. LLM training can be **much cheaper than people previously thought**.\n\n2. JetMoE-8B is **fully open-sourced and academia-friendly** because:\n    - It **only uses public datasets** for training, and the code is open-sourced. No proprietary resource is needed.\n    - It **can be finetuned with very limited compute budget** (e.g., consumer-grade GPU) that most labs can afford.\n\n3. JetMoE-8B **only has 2.2B active parameters** during inference, which drastically lowers the computational cost. Compared to a model with similar inference computation, like Gemma-2B, JetMoE-8B achieves constantly better performance.\n\n\u003csup\u003e1\u003c/sup\u003e We used a 96×H100 GPU cluster for 2 weeks, which cost ~$0.08 million.\n\nWebsite: [https://research.myshell.ai/jetmoe](https://research.myshell.ai/jetmoe)\n\nHuggingFace: [https://huggingface.co/jetmoe/jetmoe-8b](https://huggingface.co/jetmoe/jetmoe-8b)\n\nOnline Demo on Lepton AI: [https://www.lepton.ai/playground/chat?model=jetmoe-8b-chat](https://www.lepton.ai/playground/chat?model=jetmoe-8b-chat)\n\nTechnical Report: [https://arxiv.org/pdf/2404.07413.pdf](https://arxiv.org/pdf/2404.07413.pdf)\n\n## Authors\n\nThe project is contributed by [Yikang Shen](https://scholar.google.com.hk/citations?user=qff5rRYAAAAJ), [Zhen Guo](https://zguo0525.github.io/), [Tianle Cai](https://www.tianle.website/#/) and [Zengyi Qin](https://www.qinzy.tech/). For technical inquiries, please contact [Yikang Shen](https://scholar.google.com.hk/citations?user=qff5rRYAAAAJ). For media and collaboration inquiries, please contact [Zengyi Qin](https://www.qinzy.tech/).\n\n## Collaboration\n**If you have great ideas but need more resources (GPU, data, funding, etc.)**, welcome to contact **MyShell.ai** via [Zengyi Qin](https://www.qinzy.tech/). **MyShell.ai** is open to collaborations and are actively supporting high-quality open-source projects.\n\n## Benchmarks\nWe use the same evaluation methodology as in the Open LLM leaderboard. For MBPP code benchmark, we use the same evaluation methodology as in the LLaMA2 and Deepseek-MoE paper. The results are shown below:\n\n|Model|Activate Params|Training Tokens|Open LLM Leaderboard Avg|ARC|Hellaswag|MMLU|TruthfulQA|WinoGrande|GSM8k|MBPP|HumanEval|\n|---|---|---|---|---|---|---|---|---|---|---|---|\n|Shot||||25|10|5|0|5|5|3|0|\n|Metric||||acc_norm|acc_norm|acc|mc2|acc|acc|Pass@1|Pass@1|\n|LLaMA2-7B|7B|2T|51.0|53.1|78.6|46.9|38.8|74|14.5|20.8|12.8|\n|LLaMA-13B|13B|1T|51.4|**56.2**|**80.9**|47.7|39.5|**76.2**|7.6|22.0|15.8|\n|DeepseekMoE-16B|2.8B|2T|51.1|53.2|79.8|46.3|36.1|73.7|17.3|34.0|**25.0**|\n|Gemma-2B|2B|2T|46.4|48.4|71.8|41.8|33.1|66.3|16.9|28.0|24.4|\n|JetMoE-8B|2.2B|1.25T|**53.0**|48.7|80.5|**49.2**|**41.7**|70.2|**27.8**|**34.2**|14.6|\n\n| Model               | MT-Bench Score     |\n|---------------------|-----------|\n| GPT-4               | 9.014     |\n| GPT-3.5-turbo       | 7.995     |\n| Claude-v1           | 7.923     |\n| **JetMoE-8B-chat**  | **6.681** |\n| Llama-2-13b-chat    | 6.650     |\n| Vicuna-13b-v1.3     | 6.413     |\n| Wizardlm-13b        | 6.353     |\n| Llama-2-7b-chat     | 6.269     |\n\nTo our surprise, despite the lower training cost and computation, JetMoE-8B performs even better than LLaMA2-7B, LLaMA-13B, and DeepseekMoE-16B. Compared to a model with similar training and inference computation, like Gemma-2B, JetMoE-8B achieves better performance.\n\n## Model Usage\nTo load the models, you need install this package:\n```\npip install -e .\n```\n\nThen you can load the model with the following code:\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig, AutoModelForSequenceClassification\nfrom jetmoe import JetMoEForCausalLM, JetMoEConfig, JetMoEForSequenceClassification\n\nAutoConfig.register(\"jetmoe\", JetMoEConfig)\nAutoModelForCausalLM.register(JetMoEConfig, JetMoEForCausalLM)\nAutoModelForSequenceClassification.register(JetMoEConfig, JetMoEForSequenceClassification)\n\ntokenizer = AutoTokenizer.from_pretrained('jetmoe/jetmoe-8b')\nmodel = AutoModelForCausalLM.from_pretrained('jetmoe/jetmoe-8b')\n```\n\n## Model Details\nPlease refer to the technical report [https://arxiv.org/pdf/2404.07413.pdf](https://arxiv.org/pdf/2404.07413.pdf) for model details and training details.\n\n## Acknowledgement\nWe express our gratitude to [Shengding Hu](https://shengdinghu.github.io/) for his valuable advice on the Phase 2 data mixture. We also express our gratitude to [Exabits](https://www.exabits.ai/) for their assistance in setting up the GPU clusters.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyshell-ai%2FJetMoE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyshell-ai%2FJetMoE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyshell-ai%2FJetMoE/lists"}