{"id":19316743,"url":"https://github.com/codephiliax/chat2db-internlm-deploy","last_synced_at":"2025-07-15T01:07:16.341Z","repository":{"id":220774597,"uuid":"751243312","full_name":"CodePhiliaX/chat2db-internlm-deploy","owner":"CodePhiliaX","description":"use","archived":false,"fork":false,"pushed_at":"2024-02-04T06:43:01.000Z","size":3,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-03T02:14:44.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodePhiliaX.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}},"created_at":"2024-02-01T08:08:45.000Z","updated_at":"2024-09-09T02:58:13.000Z","dependencies_parsed_at":"2024-02-04T08:45:46.801Z","dependency_job_id":"2d53650b-d916-4f9a-90f2-5610483ad2c2","html_url":"https://github.com/CodePhiliaX/chat2db-internlm-deploy","commit_stats":null,"previous_names":["chat2db/chat2db-internlm-deploy","codephiliax/chat2db-internlm-deploy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodePhiliaX/chat2db-internlm-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodePhiliaX%2Fchat2db-internlm-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodePhiliaX%2Fchat2db-internlm-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodePhiliaX%2Fchat2db-internlm-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodePhiliaX%2Fchat2db-internlm-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodePhiliaX","download_url":"https://codeload.github.com/CodePhiliaX/chat2db-internlm-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodePhiliaX%2Fchat2db-internlm-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265383219,"owners_count":23756491,"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-11-10T01:12:32.263Z","updated_at":"2025-07-15T01:07:16.285Z","avatar_url":"https://github.com/CodePhiliaX.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# chat2db-internlm-deploy\n\n\n语言：中文  | [English](README_EN.md)\n\n## 📖 简介\n这个工程介绍了如何在[InternLM](https://github.com/InternLM/InternLM)的[InternStudio](https://studio.intern-ai.org.cn/)上部署InternLM的各个版本的模型，并将大模型应用到Chat2DB客户端中。读者也可以自行选择合适的云平台进行部署。\n\n感谢[InternLM](https://github.com/InternLM/InternLM)对本项目的大力支持，欢迎大家关注[InternLM](https://github.com/InternLM/InternLM)获取更多信息，后续会在本文档中陆续加入如何微调InternLM模型的教程。\n\n## 📦 硬件要求\n|      模型       | 最低GPU显存(推理) | 最低GPU显存(高效参数微调) |\n|:-------------:|:-----------:|:---------------:|\n|  InternLM-7b  |    18GB     |      24GB       |\n| InternLM2-7b  |    18GB     |      24GB       |\n| InternLM-20b  |    42GB     |      58GB       |\n| InternLM2-20b |    42GB     |      58GB       |\n\n\n## 📦 部署\n### 📦 在InternStudio中部署InternLM模型\n\n1. 前往[InternStudio平台](https://studio.intern-ai.org.cn/)\n2. 创建一个开发机实例，可以根据需要的算力配置开发机的规格\n   \u003cimg src=\"http://gpt.sqlgpt.cn/download/img/1.png\"\u003e\n   \u003cimg src=\"http://gpt.sqlgpt.cn/download/img/2.png\"\u003e\n   \n3. 进入开发机在开发机上打开一个终端，安装[FastChat](https://github.com/lm-sys/FastChat)\n```bash\nconda create -n fastchat python=3.10 -y\nconda activate fastchat\npip install \"fschat[model_worker,webui]\" -i https://pypi.tuna.tsinghua.edu.cn/simple\npip install einops -i https://pypi.tuna.tsinghua.edu.cn/simple\n```\n4. 执行如下命令来启动InternLM模型，InternLM各个版本的模型默认放在/root/share/model_repos/文件夹下，启动不同的模型只需修改如下命令中的模型路径即可，如果读者是使用的其他云平台，可以手动[下载模型](https://github.com/InternLM/InternLM)并将模型放在任意路径下，然后修改如下命令中的模型路径即可\n```\npython -m fastchat.serve.controller --host 0.0.0.0 --port 21001\npython -m fastchat.serve.model_worker --model-path /root/share/model_repos/internlm2-7b --host 0.0.0.0\npython -m fastchat.serve.test_message --model-name internlm2-7b\npython3 -m fastchat.serve.openai_api_server --host 0.0.0.0 --port 8000\n```\n5.参考[InternLM文档](https://aicarrier.feishu.cn/wiki/RkBWwdOfQiuLJHkEbqhceIRjnGg)将服务器上的8000端口转发到本地开发机的9990端口\n6.参考下图配置Chat2DB客户端，如果读者是部署的其他版本模型，对应的修改如下模型配置即可\n \u003cimg src=\"http://gpt.sqlgpt.cn/download/img/4.png\"\u003e\n7.如上配置客户端之后即可本地体验InternLM模型的效果啦\n\n## 微调\n### 📦 在InternStudio中微调InternLM模型\n\n#### TODO：待添加\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodephiliax%2Fchat2db-internlm-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodephiliax%2Fchat2db-internlm-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodephiliax%2Fchat2db-internlm-deploy/lists"}