codex-light
所属分类:自动编程
开发工具:Jupyter Notebook
文件大小:2660KB
下载次数:0
上传日期:2023-04-25 18:50:37
上 传 者:
sh-1993
说明: 探索如何重新创建(超)轻版本的codex的项目,仅适用于python编程语言。
(Project to explore how to recreate a (super) light version of codex, only for python programming language.)
文件列表:
data (0, 2023-04-26)
data\python_text.txt (2694035, 2023-04-26)
data\repos_python (0, 2023-04-26)
data\repos_python\Python (0, 2023-04-26)
data\test.pt (2153963, 2023-04-26)
data\train.pt (19379819, 2023-04-26)
inference_kaggle_v1.py (1471, 2023-04-26)
inference_v1.py (1462, 2023-04-26)
model.py (4242, 2023-04-26)
notebooks (0, 2023-04-26)
notebooks\train_kaggle.ipynb (15466, 2023-04-26)
process_data.py (792, 2023-04-26)
requirements.txt (60, 2023-04-26)
train.py (2438, 2023-04-26)
utils.py (2090, 2023-04-26)
weights (0, 2023-04-26)
weights\v1.pt (233657, 2023-04-26)
weights\v1_kaggle.pt (6602779, 2023-04-26)
# codex-light
Project to explore how to recreate a (super) light version of codex, only for python programming language.
WIP
## Quickstart
```cmd
python -m venv .venv
// for windows .venv/Scripts/activate
source .venv/bin/activate
pip install -r requirements.txt
```
## Training and inference
Train a model with (change as you wish the default configuration of the transformer):
```
python train.py
```
Run the tiny version (256 kB) with
```
python inference_v1.py
```
```
Model has been loaded from weights/v1.pt
INPUT
------------------
"Input values must
GENERATED
------------------
=* soul
""
febttw fllestp(secthirnct rate is (matep[0] * larst = [1] 4, 0:, "Slinvat(_cu, "+ stageme:
nreter: Checort ice rod weypals:
of nod mi Aremny)
pr imal the fountor preicke imn of ABo vetysfpacorn oul blis itestd clitr ecilopt
Lof inverurl_alstiate te meclution p
```
## Bigger model
Run a 6MB transformer (trained on kaggle notebooks using `notebooks/train_kaggle.ipynb` on GPU):
```cmd
python inference_v1_kaggle.py
```
```
Model has been loaded from weights/v1_kaggle.pt
INPUT
------------------
"Input values must either be float or int: " f"{list(locals().values())}"
)
projected_x = ((x * distance) / (z + distance)) * scale
projected_y = ((y * distance) / (z + di
GENERATED
------------------
ff)))
with += np.splagocits(int, propes, dict):
for i i in (
ass _y] == exValse()
if is_main_eximpleate():
"Hore Remural the namess for equal a imbe erroriations chautn of mat_positive
match m:
curromsitic_value data doctest
""""
return st(syprippe
```
almost AGI ah?
## TODO:
- Log training with `wandb`
- Use more advance tokenizer (right now is on character level)
近期下载者:
相关文件:
收藏者: