{"id":13901170,"url":"https://github.com/git-cloner/codegen","last_synced_at":"2025-07-17T21:32:30.762Z","repository":{"id":65256905,"uuid":"556632992","full_name":"git-cloner/codegen","owner":"git-cloner","description":"Salesforce codegen with web server","archived":false,"fork":false,"pushed_at":"2024-07-18T04:43:28.000Z","size":2880,"stargazers_count":186,"open_issues_count":0,"forks_count":35,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-07T21:45:07.226Z","etag":null,"topics":["chatbot","codegen","extension","gpt-j-6b","gpt-neo","salesforce"],"latest_commit_sha":null,"homepage":"https://gitclone.com/aiit/chat/","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/git-cloner.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,"publiccode":null,"codemeta":null}},"created_at":"2022-10-24T08:07:53.000Z","updated_at":"2024-07-18T04:43:32.000Z","dependencies_parsed_at":"2024-07-18T06:01:37.406Z","dependency_job_id":"81dce47e-6a62-44e3-81be-c18396af7738","html_url":"https://github.com/git-cloner/codegen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-cloner%2Fcodegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-cloner%2Fcodegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-cloner%2Fcodegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-cloner%2Fcodegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-cloner","download_url":"https://codeload.github.com/git-cloner/codegen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305218,"owners_count":17603766,"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":["chatbot","codegen","extension","gpt-j-6b","gpt-neo","salesforce"],"created_at":"2024-08-06T21:00:58.002Z","updated_at":"2024-11-25T09:30:55.673Z","avatar_url":"https://github.com/git-cloner.png","language":"Python","readme":"# Codegen\n\nSalesforce codegen,THUDM/ChatGLM-6B with web server\n\nFork from https://github.com/salesforce/CodeGen\n\nAdd web server support \n\nSupport THUDM/ChatGLM-6B Now\n\n## Online demo\n\nhttps://gitclone.com/aiit/chat/\n\n## Visual Studio Code  Extension\n\nhttps://github.com/git-cloner/codegeeker\n\n ![](https://gitclone.com/download1/aiit/codegeeker.gif)\n\n ![](https://gitclone.com/download1/aiit/gpt-2.gif)\n\n## reference\nhttps://zhuanlan.zhihu.com/p/598982945 做一个生产级别的类似ChatGPT的聊天机器人\u003cbr\u003e\nhttps://www.zhihu.com/zvideo/1596160335995641856 基于gpt-j-6b的聊天机器人\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/594946225 在亚马逊aws的云主机上搭建gpt-j-6b模型\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/588616069 做一个类似github copilot的免费代码生成器\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/620233511 清华ChatGLM-6B模型实践\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/620070973 ColossalAI推理实践\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/619954588 Chinese-LLaMA-Alpaca实践\u003cbr\u003e\nhttps://zhuanlan.zhihu.com/p/624286959 FastChat部署与流式调用实践\n\n## usage\n\n### Clone code\n\ngit clone https://gitclone.com/github.com/git-cloner/codegen\n\n### Install\n\n#### 1.install Nvidia Graphics Card and Driver\n\n#### 2.install conda\n\n#### 3.init vitual runtime\n\n```shell\nconda create -n codegen python=3.8\nconda activate codegen\npip install pillow -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install torch torchvision torchaudio -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install transformers==4.25.1 -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install accelerate -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install aiohttp==3.8.3 -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install aiohttp_cors==0.7.0 -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\n#pip install huggingface for gpt-neo\npip install datasets -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install gradio -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\npip install sentencepiece==0.1.91 -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com\n```\n\n### Download model\n\n```shell\nwget -P checkpoints https://storage.googleapis.com/sfr-codegen-research/checkpoints/codegen-350M-nl.tar.gz \u0026\u0026 tar -xvf checkpoints/codegen-350M-nl.tar.gz -C checkpoints/\nwget -P checkpoints https://storage.googleapis.com/sfr-codegen-research/checkpoints/codegen-350M-multi.tar.gz \u0026\u0026 tar -xvf checkpoints/codegen-350M-multi.tar.gz -C checkpoints/\nwget -P checkpoints https://storage.googleapis.com/sfr-codegen-research/checkpoints/codegen-350M-mono.tar.gz \u0026\u0026 tar -xvf checkpoints/codegen-350M-mono.tar.gz -C checkpoints/\n```\n\n### run as web server\n```shell\nconda activate codegen\npython codegen.py\n```\n\n### test\npost: http://127.0.0.1:5001/codegen or direct post to :https://gitclone.com/aiit/codegen\n\n#### Use Salesforce codegen\n\ninput params: {\"context\":\"def hello_world():\",\"maxlength\":128}\n\nreturn params: \n{\n    \"result\": \"\\n        print(\\\"Hello world\\\")\\n        hello_world()\\n      \",\n    \"time\": 1.9620850095525384\n}\n\n#### Use THUDM/ChatGLM-6B\n\ninput params: {\"context\":\"写一个python版的数组排序\",\"maxlength\":128}\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-cloner%2Fcodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-cloner%2Fcodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-cloner%2Fcodegen/lists"}