{"id":19054719,"url":"https://github.com/ssbuild/chatglm_rlhf","last_synced_at":"2025-10-17T01:45:29.651Z","repository":{"id":164221681,"uuid":"629889442","full_name":"ssbuild/chatglm_rlhf","owner":"ssbuild","description":"chatglm_rlhf_finetuning","archived":false,"fork":false,"pushed_at":"2023-10-10T08:16:32.000Z","size":153,"stargazers_count":28,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-04-24T03:32:54.272Z","etag":null,"topics":["chat","chatglm","finetuning","lora","qlora","reward","rlhf"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ssbuild.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-19T08:25:55.000Z","updated_at":"2024-12-25T06:34:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e1c6621-4161-47dc-b5b3-40fbd0d1ff3e","html_url":"https://github.com/ssbuild/chatglm_rlhf","commit_stats":null,"previous_names":["ssbuild/chatglm_rlhf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssbuild/chatglm_rlhf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fchatglm_rlhf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fchatglm_rlhf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fchatglm_rlhf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fchatglm_rlhf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbuild","download_url":"https://codeload.github.com/ssbuild/chatglm_rlhf/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fchatglm_rlhf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279269091,"owners_count":26137470,"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-16T02:00:06.019Z","response_time":53,"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":["chat","chatglm","finetuning","lora","qlora","reward","rlhf"],"created_at":"2024-11-08T23:39:29.858Z","updated_at":"2025-10-17T01:45:29.601Z","avatar_url":"https://github.com/ssbuild.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n## update information\r\n- [deep_training](https://github.com/ssbuild/deep_training)\r\n\r\n```text\r\n    06-13 support resize_token_embeddings\r\n    06-01 support deepspeed training for lora adalora prompt,0.1.9 和 0.1.10合并\r\n    05-27 add qlora transformers\u003e=4.30\r\n```\r\n\r\n## install\r\n    python \u003e= 3.10\r\n - pip install -i https://pypi.org/simple -U -r requirements\r\n - 如果无法安装 , 可以切换官方源 pip install -i https://pypi.org/simple -U -r requirements.txt  \r\n\r\n\r\n## update information\r\n- [deep_training](https://github.com/ssbuild/deep_training)\r\n\r\n\r\n\r\n## weight\r\n- [chatglm-6b](https://huggingface.co/THUDM/chatglm-6b)   支持四种微调方式\r\n- [chatglm-6b-int8](https://huggingface.co/THUDM/chatglm-6b-int8)  目前只支持ptv2微调和推理\r\n- [chatglm-6b-int4](https://huggingface.co/THUDM/chatglm-6b-int4)  目前只支持ptv2微调和推理\r\n\r\n\r\n## data sample\r\n\r\n```json\r\n{\r\n\t\"prompt\": \"\\n\\nHuman:你能描述如何清除笔记本计算机屏幕上的指纹和污垢的步骤吗?\\n\\nAssistant:是的,也许。为了清洁你的屏幕,你首先需要使用微纤维布或软溼布,轻轻地擦拭屏幕表面。接下来,你会想抓住一个软,无毛巾,微纤维清洁布,轻轻地擦回屏幕上去除指纹和污垢。\\n\\nHuman:我可以将伊索普罗素酒精喷射到布上,并以这种方式清洗它吗?\\n\\nAssistant:\",\r\n\t\"response\": \" 是的,你可以这样做,以帮助布从屏幕上收集更多的污垢。 请确保始终使用干净的软布,而不是一块粗糙的、粗糙的或结构化的材料,并确保它是无毛布的。\",\r\n\t\"chosen\": \" 是的,你可以这样做,以帮助布从屏幕上收集更多的污垢。 请确保始终使用干净的软布,而不是一块粗糙的、粗糙的或结构化的材料,并确保它是无毛布的。\",\r\n\t\"rejected\": \" 是的,你可以直接将它喷射到布上。\"\r\n}\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n## infer\r\n    # infer_finetuning.py 推理微调模型\r\n    # infer_lora_finetuning.py 推理微调模型\r\n    # infer_ptuning.py 推理p-tuning-v2微调模型\r\n     python infer_finetuning.py\r\n\r\n\r\n\r\n## training\r\n```text\r\n    #制作数据\r\n    python data_utils.py\r\n    注: num_process_worker 为多进程制作数据 ， 如果数据量较大 ， 适当调大至cpu数量\r\n    dataHelper.make_dataset_with_args(data_args.train_file,mixed_data=False, shuffle=True,mode='train',num_process_worker=0)\r\n    \r\n    #训练\r\n    python train.py\r\n```\r\n   \r\n\r\n## 训练参数\r\n[训练参数](args.MD)\r\n\r\n## 友情链接\r\n\r\n- [pytorch-task-example](https://github.com/ssbuild/pytorch-task-example)\r\n- [tf-task-example](https://github.com/ssbuild/tf-task-example)\r\n- [chatmoss_finetuning](https://github.com/ssbuild/chatmoss_finetuning)\r\n- [chatglm_finetuning](https://github.com/ssbuild/chatglm_finetuning)\r\n- [chatyuan_finetuning](https://github.com/ssbuild/chatyuan_finetuning)\r\n- [llm_finetuning](https://github.com/ssbuild/llm_finetuning)\r\n- [rlhf_llm](https://github.com/ssbuild/rlhf_llm)\r\n- [rlhf_chatglm](https://github.com/ssbuild/rlhf_chatglm)\r\n- [rlhf_chatyuan](https://github.com/ssbuild/rlhf_chatyuan)\r\n- [rwkv_finetuning](https://github.com/ssbuild/rwkv_finetuning)\r\n\r\n## \r\n    纯粹而干净的代码","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbuild%2Fchatglm_rlhf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbuild%2Fchatglm_rlhf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbuild%2Fchatglm_rlhf/lists"}