{"id":17998791,"url":"https://github.com/internlm/internevo","last_synced_at":"2025-10-07T03:24:24.032Z","repository":{"id":217428071,"uuid":"743870569","full_name":"InternLM/InternEvo","owner":"InternLM","description":"InternEvo is an open-sourced lightweight training framework aims to support model pre-training without the need for extensive dependencies.","archived":false,"fork":false,"pushed_at":"2025-08-21T02:35:36.000Z","size":7124,"stargazers_count":404,"open_issues_count":70,"forks_count":70,"subscribers_count":10,"default_branch":"develop","last_synced_at":"2025-08-21T04:37:58.897Z","etag":null,"topics":["910b","deepspeed-ulysses","flash-attention","gemma","internlm","internlm2","llama3","llava","llm-framework","llm-training","multi-modal","pipeline-parallelism","pytorch","ring-attention","sequence-parallelism","tensor-parallelism","transformers-models","zero3"],"latest_commit_sha":null,"homepage":"https://internevo.readthedocs.io/zh-cn/latest/?badge=latest","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/InternLM.png","metadata":{"files":{"readme":"README-ja-JP.md","changelog":"CHANGE_LOG.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-16T06:57:08.000Z","updated_at":"2025-08-21T02:35:39.000Z","dependencies_parsed_at":"2024-02-19T03:28:40.845Z","dependency_job_id":"41c52b67-f6fc-41c3-ac79-84f0c34d9185","html_url":"https://github.com/InternLM/InternEvo","commit_stats":null,"previous_names":["internlm/internevo"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/InternLM/InternEvo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InternLM%2FInternEvo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InternLM%2FInternEvo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InternLM%2FInternEvo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InternLM%2FInternEvo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InternLM","download_url":"https://codeload.github.com/InternLM/InternEvo/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InternLM%2FInternEvo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278714089,"owners_count":26033014,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["910b","deepspeed-ulysses","flash-attention","gemma","internlm","internlm2","llama3","llava","llm-framework","llm-training","multi-modal","pipeline-parallelism","pytorch","ring-attention","sequence-parallelism","tensor-parallelism","transformers-models","zero3"],"created_at":"2024-10-29T22:07:29.908Z","updated_at":"2025-10-07T03:24:24.017Z","avatar_url":"https://github.com/InternLM.png","language":"Python","readme":"# InternEvo\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./doc/imgs/InternEvo_logo.png\" width=\"800\"/\u003e\n\n[![Documentation Status](https://readthedocs.org/projects/internevo/badge/?version=latest)](https://internevo.readthedocs.io/zh_CN/latest/?badge=latest)\n[![license](./doc/imgs/license.svg)](./LICENSE)\n\n[📘使用方法](./doc/en/usage.md) |\n[🛠️インストール](./doc/en/install.md) |\n[📊パフォーマンス](./doc/en/train_performance.md) |\n[🤔問題報告](https://github.com/InternLM/InternEvo/issues/new)\n\n[English](./README.md) |\n[简体中文](./README-zh-Hans.md) |\n[日本語](./README-ja-JP.md)\n\n\u003c/div\u003e\n\n\n### 最新ニュース 🔥\n\n- 2024/08/29: InternEvoは、huggingface形式のストリーミングデータセットをサポートしています。データフローの詳細な手順を追加しました。\n\n- 2024/04/17: InternEvoは、NPU-910Bクラスターでモデルのトレーニングをサポートしています。\n\n- 2024/01/17: InternLMシリーズのモデルについてさらに詳しく知りたい方は、当社の組織内の[InternLM](https://github.com/InternLM/InternLM)をご覧ください。\n\n\n## イントロダクション\n\nInternEvoは、広範な依存関係を必要とせずにモデルの事前トレーニングをサポートすることを目的としたオープンソースの軽量トレーニングフレームワークです。単一のコードベースで、数千のGPUを搭載した大規模クラスターでの事前トレーニングと、単一GPUでのファインチューニングをサポートし、顕著なパフォーマンス最適化を実現しています。InternEvoは、1024個のGPUでのトレーニング中に約90%の加速効率を達成しています。\n\nInternEvoトレーニングフレームワークを基に、当社はInternLM-7BシリーズやInternLM-20Bシリーズを含むさまざまな大規模言語モデルを継続的にリリースしています。これらのモデルは、LLaMAのような数多くの有名なオープンソースの大規模言語モデルや、その他の業界をリードするモデルを大きく上回る性能を発揮しています。\n\n## インストール\n\nまず、指定バージョンのtorch、torchvision、torchaudio、およびtorch-scatterをインストールしてください。\nたとえば：\n```bash\npip install --extra-index-url https://download.pytorch.org/whl/cu118 torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0+cu118\npip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.0+cu118.html\n```\n\nInternEvoをインストールします：\n```bash\npip install InternEvo\n```\n\nflash-attention（バージョンv2.2.1）をインストールします：\n\nもしflash-attentionを使用してトレーニングを加速する必要があり、あなたの環境でサポートされている場合は、以下の通りインストールしてください：\n```bash\npip install flash-attn==2.2.1\n```\n\nインストール環境やソースコードインストールに関するより詳細な情報については、以下のリンクを参照してください [インストールチュートリアル](https://internevo.readthedocs.io/en/latest/install.html#)\n\n## クイックスタート\n\n### トレーニングスクリプト\n\nまず、トレーニングスクリプトを準備してください [train.py](https://github.com/InternLM/InternEvo/blob/develop/train.py)\n\nより詳細な説明については、以下を参照してください [トレーニングチュートリアル](https://internevo.readthedocs.io/en/latest/training.html#)\n\n### データの準備\n\n次に、トレーニングまたはファインチューニングのためのデータを準備してください。\n\nデータセットをHuggingfaceからダウンロードし、roneneldan/TinyStories データセットを例にとって説明します：\n```bash\nhuggingface-cli download --repo-type dataset --resume-download \"roneneldan/TinyStories\" --local-dir \"/mnt/petrelfs/hf-TinyStories\"\n```\n\nトークナイザーをローカルパスに配置してください。例として、https://huggingface.co/internlm/internlm2-7b/tree/main から special_tokens_map.json、tokenizer.model、tokenizer_config.json、tokenization_internlm2.py、tokenization_internlm2_fast.py をローカルの /mnt/petrelfs/hf-internlm2-tokenizer にダウンロードしてください。\n\n次に、設定ファイルを以下のように変更します：\n```bash\nTRAIN_FOLDER = \"/mnt/petrelfs/hf-TinyStories\"\ndata = dict(\n    type=\"streaming\",\n    tokenizer_path=\"/mnt/petrelfs/hf-internlm2-tokenizer\",\n)\n```\n\n他のタイプのデータセットの準備については、以下を参照してください [使用方法のチュートリアル](https://internevo.readthedocs.io/en/latest/usage.html#)\n\n### Configuration File\n\n設定ファイルの内容は以下の通りです：[7B_sft.py](https://github.com/InternLM/InternEvo/blob/develop/configs/7B_sft.py)\n\nより詳細な紹介については、以下を参照してください [使用方法のチュートリアル](https://internevo.readthedocs.io/en/latest/usage.html#)\n\n### トレーニング開始\n\nトレーニングは、slurmまたはtorch distributed環境で開始できます。\n\nSlurm環境で2ノード16カードを使用する場合、コマンドは以下の通りです：\n```bash\n$ srun -p internllm -N 2 -n 16 --ntasks-per-node=8 --gpus-per-task=1 python train.py --config ./configs/7B_sft.py\n```\n\ntorchを使用し、1ノード8カードで実行する場合、コマンドは以下の通りです：\n```bash\n$ torchrun --nnodes=1 --nproc_per_node=8 train.py --config ./configs/7B_sft.py --launcher \"torch\"\n```\n\n## システムアーキテクチャ\n\nアーキテクチャの詳細については、[システムアーキテクチャドキュメント](./doc/en/structure.md)を参照してください。\n\n## フィーチャーズー\n\n\u003cdiv align=\"center\"\u003e\n  \u003cb\u003eInternEvo フィーチャーズー\u003c/b\u003e\n\u003c/div\u003e\n\u003ctable align=\"center\"\u003e\n  \u003ctbody\u003e\n    \u003ctr align=\"center\" valign=\"bottom\"\u003e\n      \u003ctd\u003e\n        \u003cb\u003eデータ\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cb\u003eモデル\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cb\u003e並列\u003c/b\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cb\u003eツール\u003c/b\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr valign=\"top\"\u003e\n      \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003eTokenized\u003c/li\u003e\n        \u003cli\u003eStreaming\u003c/li\u003e\n      \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_isp_sft.py\"\u003eInternLM\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_internlm2.py\"\u003eInternLM2\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/8B_internlm3.py\"\u003eInternLM3\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_llama2.py\"\u003eLlama2\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_qwen2.py\"\u003eQwen2\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_baichuan2.py\"\u003eBaichuan2\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/7B_gemma.py\"\u003egemma\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/57B_qwen2_MoE.py\"\u003eQwen2-MoE\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"configs/8x7B_mixtral.py\"\u003eMixtral\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cul\u003e\n          \u003cli\u003eZeRO 1.5\u003c/li\u003e\n          \u003cli\u003e1F1B Pipeline Parallel\u003c/li\u003e\n          \u003cli\u003ePyTorch FSDP Training\u003c/li\u003e\n          \u003cli\u003eMegatron-LM Tensor Parallel (MTP)\u003c/li\u003e\n          \u003cli\u003eMegatron-LM Sequence Parallel (MSP)\u003c/li\u003e\n          \u003cli\u003eFlash-Attn Sequence Parallel (FSP)\u003c/li\u003e\n          \u003cli\u003eIntern Sequence Parallel (ISP)\u003c/li\u003e\n          \u003cli\u003eMemory Profiling\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cul\u003e\n          \u003cli\u003e\u003ca href=\"tools/transformers/README.md\"\u003eConvert ckpt to HF\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"tools/transformers/README.md\"\u003eRevert ckpt from HF\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"tools/tokenizer.py\"\u003eRaw Data Tokenizer\u003c/a\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ca href=\"tools/alpaca_tokenizer.py\"\u003eAlpaca data Tokenizer\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## コントリビュート\n\n我々は、InternEvo を改善し、向上させるために尽力してくれたすべての貢献者に感謝している。コミュニティ・ユーザーのプロジェクトへの参加が強く推奨されます。プロジェクトへの貢献方法については、貢献ガイドラインを参照してください。\n\n## 謝辞\n\nInternEvo コードベースは、上海 AI 研究所と様々な大学や企業の研究者によって貢献されたオープンソースプロジェクトです。プロジェクトに新機能を追加してくれたすべての貢献者と、貴重なフィードバックを提供してくれたユーザーに感謝したい。私たちは、このツールキットとベンチマークが、InternLM をファインチューニングし、独自のモデルを開発するための柔軟で効率的なコードツールをコミュニティに提供し、オープンソースコミュニティに継続的に貢献できることを願っています。2 つのオープンソースプロジェクト、[flash-attention](https://github.com/HazyResearch/flash-attention) と [ColossalAI](https://github.com/hpcaitech/ColossalAI) に感謝します。\n\n## 引用\n\n```\n@misc{2023internlm,\n    title={InternLM: A Multilingual Language Model with Progressively Enhanced Capabilities},\n    author={InternLM Team},\n    howpublished = {\\url{https://github.com/InternLM/InternLM}},\n    year={2023}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternlm%2Finternevo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finternlm%2Finternevo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternlm%2Finternevo/lists"}