Skip to content

Commit b6bb9e6

Browse files
committed
jekyll page rebuild
1 parent 4d3a28f commit b6bb9e6

1 file changed

Lines changed: 51 additions & 42 deletions

File tree

_posts/2023/2023-04/2023-04-18-FauxPilot-开源插件-GitHub-Copilot .md

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,52 @@ author: Franklinfang
99
* content
1010
{:toc}
1111

12-
1312
GitHub Copilot 是 GitHub 去年 6 月推出的人工智能模型,这是一个利用机器学习技术为开发者提供代码建议和代码补全的工具,能够帮助开发者更快完成编程任务。但由于 GitHub Copilot 训练使用的数据集,以及该工具如今成为了一款向开发者收费的商业性产品,GitHub Copilot 也引发了一些争议。
1413

1514
那有没有一个能够替代 GitHub Copilot 的工具呢?
1615

17-
1816
近日美国纽约大学计算机科学和工程系助理教授 Brendan Dolan-Gavitt 开源了一个名为 FauxPilot 的项目,根据介绍,这是 GitHub Copilot 的替代品,能够在本地运行并且不会上传用户的数据,如果开发者使用的是自己训练的 AI 模型,也无需再担心生成代码的许可问题。
1917

2018
GitHub Copilot 依赖于 OpenAI Codex,后者是一个基于 GPT-3 的自然语言转代码系统,使用了存储在 GitHub 上的 "数十亿行公共代码" 进行训练。而 FauxPilot 并没有使用 Codex,为了方便开发者使用它依赖了 Salesforce 的 CodeGen 模型,CodeGen 同样也是使用公共开源代码进行训练的。
2119

22-
2320
目前 Salesforce CodeGen 提供了 3.5 亿、20 亿、60 亿 和 160 亿参数的模型,但在 FauxPilot 这边只看到 3.5 亿、60 亿和 160 亿的模型,暂时没有 20 亿模型可用,这就对训练模型需要使用的 GPU 提出了较高的要求。因为 3.5 亿参数的模型仅需要 2GB VRAM;而稍高一个档次的 60 亿参数模型所需要的 VRAM 就大幅上涨到了 13GB,这就需要至少 RTX 3090 的显卡才能跑,就更不用说 160 亿的模型了。
2421

25-
2622
![image](2cbc40a18df03a0d3492702cae9c4f2d.png)
2723

24+
由于 CodeGen 模型同样是通过公共代码训练的,因此给出的代码建议可能仍然存在版权 / 许可方面的问题。开发者 Dolan-Gavitt 表示,有足够计算能力的公司或开发者可以使用自己专有的代码库或使用特定协议的开源代码库(如只含 GPL 协议的代码仓库)训练模型,将训练好的模型导入 FauxPilot 即可正常使用,这样也无需再担心产生的代码会有许可问题了。这就是 FauxPilot 可以在本地运行的好处,它也能够为企业提供一种在内部运行人工智能辅助软件的方式。
25+
26+
FauxPilot 的另一个特点是对于隐私方面的考虑,它不会读取公司或开发者编写的代码,也不会将这些信息共享给第三方。
27+
28+
FauxPilot 在 GitHub 上的地址如下:[https://github.com/moyix/fauxpilot](https://github.com/moyix/fauxpilot)
29+
30+
## 简介
31+
32+
这是一个本地托管版本的 GitHub Copilot。它在英伟达的 Triton 推理服务器中使用了 SalesForce CodeGen 模型和 FasterTransformer 后端。
33+
34+
## 前提条件
35+
36+
- Docker
37+
- docker-compose >= 1.28
38+
- 一台计算能力大于 7.0 的英伟达 GPU,以及足够的 VRAM 来运行你想要的模型
39+
- nvidia-docker
40+
- curl 和 zstd,用于下载和解包模型
41+
42+
## Copilot 插件
43+
44+
你可以配置官方 VSCode Copilot 插件来使用你的本地服务器。只要编辑你的 settings.json 来添加。
45+
46+
··· json
47+
48+
"github.copilot.advanced": {
49+
"debug.overrideEngine": "codegen",
50+
"debug.testOverrideProxyUrl": "http://localhost:5000",
51+
"debug.overrideProxyUrl": "http://localhost:5000"
52+
}
53+
```
54+
55+
56+
57+
2858
2959
3060
@@ -33,8 +63,8 @@ GitHub Copilot 依赖于 OpenAI Codex,后者是一个基于 GPT-3 的自然语
3363
3464
$ ./launch.sh
3565
[+] Running 2/0
36-
⠿ Container fauxpilot-triton-1 Created 0.0s
37-
⠿ Container fauxpilot-copilot_proxy-1 Created 0.0s
66+
⠿ Container fauxpilot-triton-1 Created 0.0s
67+
⠿ Container fauxpilot-copilot_proxy-1 Created 0.0s
3868
Attaching to fauxpilot-copilot_proxy-1, fauxpilot-triton-1
3969
fauxpilot-triton-1 |
4070
fauxpilot-triton-1 | =============================
@@ -84,7 +114,7 @@ GitHub Copilot 依赖于 OpenAI Codex,后者是一个基于 GPT-3 的自然语
84114
fauxpilot-triton-1 |
85115
fauxpilot-triton-1 | I0803 01:51:04.712916 93 server.cc:583]
86116
fauxpilot-triton-1 | +-------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
87-
fauxpilot-triton-1 | | Backend | Path | Config |
117+
fauxpilot-triton-1 | | Backend | Path| Config |
88118
fauxpilot-triton-1 | +-------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
89119
fauxpilot-triton-1 | | fastertransformer | /opt/tritonserver/backends/fastertransformer/libtriton_fastertransformer.so | {"cmdline":{"auto-complete-config":"false","min-compute-capability":"6.000000","backend-directory":"/opt/tritonserver/backends","default-max-batch-size":"4"}} |
90120
fauxpilot-triton-1 | +-------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -99,45 +129,24 @@ GitHub Copilot 依赖于 OpenAI Codex,后者是一个基于 GPT-3 的自然语
99129
fauxpilot-triton-1 | I0803 01:51:04.738989 93 metrics.cc:650] Collecting metrics for GPU 0: NVIDIA RTX A6000
100130
fauxpilot-triton-1 | I0803 01:51:04.739373 93 tritonserver.cc:2159]
101131
fauxpilot-triton-1 | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
102-
fauxpilot-triton-1 | | Option | Value |
132+
fauxpilot-triton-1 | | Option | Value |
103133
fauxpilot-triton-1 | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
104-
fauxpilot-triton-1 | | server_id | triton |
105-
fauxpilot-triton-1 | | server_version | 2.23.0 |
134+
fauxpilot-triton-1 | | server_id | triton
135+
|
136+
fauxpilot-triton-1 | | server_version | 2.23.0 |
106137
fauxpilot-triton-1 | | server_extensions | classification sequence model_repository model_repository(unload_dependents) schedule_policy model_configuration system_shared_memory cuda_shared_memory binary_tensor_data statistics trace |
107-
fauxpilot-triton-1 | | model_repository_path[0] | /model |
108-
fauxpilot-triton-1 | | model_control_mode | MODE_NONE |
109-
fauxpilot-triton-1 | | strict_model_config | 1 |
110-
fauxpilot-triton-1 | | rate_limit | OFF |
111-
fauxpilot-triton-1 | | pinned_memory_pool_byte_size | 268435456 |
112-
fauxpilot-triton-1 | | cuda_memory_pool_byte_size{0} | 67108864 |
113-
fauxpilot-triton-1 | | response_cache_byte_size | 0 |
114-
fauxpilot-triton-1 | | min_supported_compute_capability | 6.0 |
115-
fauxpilot-triton-1 | | strict_readiness | 1 |
116-
fauxpilot-triton-1 | | exit_timeout | 30 |
138+
fauxpilot-triton-1 | | model_repository_path[0] | /model |
139+
fauxpilot-triton-1 | | model_control_mode | MODE_NONE |
140+
fauxpilot-triton-1 | | strict_model_config | 1 |
141+
fauxpilot-triton-1 | | rate_limit | OFF |
142+
fauxpilot-triton-1 | | pinned_memory_pool_byte_size | 268435456 |
143+
fauxpilot-triton-1 | | cuda_memory_pool_byte_size{0} | 67108864 |
144+
fauxpilot-triton-1 | | response_cache_byte_size | 0 |
145+
fauxpilot-triton-1 | | min_supported_compute_capability | 6.0 |
146+
fauxpilot-triton-1 | | strict_readiness | 1 |
147+
fauxpilot-triton-1 | | exit_timeout | 30 |
117148
fauxpilot-triton-1 | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
118149
fauxpilot-triton-1 |
119150
fauxpilot-triton-1 | I0803 01:51:04.740423 93 grpc_server.cc:4587] Started GRPCInferenceService at 0.0.0.0:8001
120151
fauxpilot-triton-1 | I0803 01:51:04.740608 93 http_server.cc:3303] Started HTTPService at 0.0.0.0:8000
121152
fauxpilot-triton-1 | I0803 01:51:04.781561 93 http_server.cc:178] Started Metrics Service at 0.0.0.0:8002
122-
123-
124-
由于 CodeGen 模型同样是通过公共代码训练的,因此给出的代码建议可能仍然存在版权 / 许可方面的问题。开发者 Dolan-Gavitt 表示,有足够计算能力的公司或开发者可以使用自己专有的代码库或使用特定协议的开源代码库(如只含 GPL 协议的代码仓库)训练模型,将训练好的模型导入 FauxPilot 即可正常使用,这样也无需再担心产生的代码会有许可问题了。这就是 FauxPilot 可以在本地运行的好处,它也能够为企业提供一种在内部运行人工智能辅助软件的方式。
125-
126-
FauxPilot 的另一个特点是对于隐私方面的考虑,它不会读取公司或开发者编写的代码,也不会将这些信息共享给第三方。
127-
128-
FauxPilot 在 GitHub 上的地址如下:[https://github.com/moyix/fauxpilot](https://github.com/moyix/fauxpilot)
129-
130-
## 简介
131-
132-
这是一个本地托管版本的 GitHub Copilot。它在英伟达的 Triton 推理服务器中使用了 SalesForce CodeGen 模型和 FasterTransformer 后端。
133-
134-
## 前提条件
135-
136-
- Docker
137-
- docker-compose >= 1.28
138-
- 一台计算能力大于 7.0 的英伟达 GPU,以及足够的 VRAM 来运行你想要的模型
139-
- nvidia-docker
140-
- curl 和 zstd,用于下载和解包模型
141-
142-
143-
## Copilot 插件

0 commit comments

Comments
 (0)