File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,11 @@ AI 生成的代码被开发者入库的比例。
704
704
随后,我们需要部署模型,并提供一个对应的 API,这个 API 需要与我们的 IDE 接口保持一致。这里我们采用了 OpenBayes
705
705
平台来部署模型。详细见:`code/server` 目录下的相关代码。
706
706
707
+ ```bash
708
+ pip install -r requirements.txt
709
+ python server-python38.py
710
+ ```
711
+
707
712
如下是适用于 OpenBayes 的代码,以在后台提供公网 API:
708
713
709
714
```python
@@ -748,15 +753,23 @@ if __name__ == "__main__":
748
753
| 内部代码补全 | 大于 10,000 | 不需要 |
749
754
| IDE + 代码补全 | 大于 10,000 | 需要 |
750
755
751
- #### DeepSeek 微调
756
+ #### OpenBayes + DeepSeek 微调
752
757
753
- 详细见:[code/finetune/finetune.ipynb](code/finetune/finetune.ipynb)
758
+ 在这里我们使用的是,以及 DeepSeek 官方提供的脚本来进行微调。
754
759
755
- #### 参数配置
760
+ - 云 GPU: [OpenBayes](https://openbayes.com/console/signup?r=phodal_uVxU)
761
+ - GPU 算力:4090x2 (目测和微调参数有关,但是我试了几次 4090 还是不行)
762
+ - 微调脚本:[https://github.com/deepseek-ai/DeepSeek-Coder](https://github.com/deepseek-ai/DeepSeek-Coder)
763
+ - 数据集:6000
756
764
757
- TODO
765
+ 我在 OpenBayes 上传了的 DeepSeek 模型:[OpenBayes deepseek-coder-6.7b-instruct](https://openbayes.com/console/phodal/models/zV91IERweWd/1/overview),你可以在创建时直接使用这个模型。
766
+
767
+ 
768
+
769
+ 其它:
758
770
759
- 微调参数,详细见:[Trainer](https://huggingface.co/docs/transformers/v4.36.1/zh/main_classes/trainer)
771
+ - 详细的 Notebook 见:[code/finetune/finetune.ipynb](code/finetune/finetune.ipynb)
772
+ - 微调参数,详细见:[Trainer](https://huggingface.co/docs/transformers/v4.36.1/zh/main_classes/trainer)
760
773
761
774
### 数据集构建
762
775
Original file line number Diff line number Diff line change 1
1
accelerate == 0.23.0
2
2
bitsandbytes == 0.41.1
3
- gradio == 3.48.0
3
+ # gradio==3.48.0
4
4
protobuf == 3.20.3
5
- # scipy==1.11.2
5
+ scipy == 1.11.2
6
6
sentencepiece == 0.1.99
7
7
spaces == 0.16.1
8
8
torch == 2.0.0
You can’t perform that action at this time.
0 commit comments