Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/promptlycode/inline-completion-model
PromptlyCode inline completion model by PyTorch
https://github.com/promptlycode/inline-completion-model
ai deep-learning python pytorch seq2seq transformers transformers-models
Last synced: 25 days ago
JSON representation
PromptlyCode inline completion model by PyTorch
- Host: GitHub
- URL: https://github.com/promptlycode/inline-completion-model
- Owner: PromptlyCode
- License: mit
- Created: 2024-11-25T02:37:19.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-02T07:09:08.000Z (about 1 month ago)
- Last Synced: 2024-12-09T10:14:48.115Z (25 days ago)
- Topics: ai, deep-learning, python, pytorch, seq2seq, transformers, transformers-models
- Language: Python
- Homepage:
- Size: 916 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PromptlyCode inline completion model
* PromptlyCode inline completion model by PyTorch## Features
- [ ] Tab automatically complete code and predict code use vscode inline completion
## Init
* Setup python env
```sh
conda create -n inline-completion-model python=3.11
conda activate inline-completion-model
poetry install
```## Seq2Seq model
* Input, Output Prediction
```
Input: "def func(x):"
Output Prediction: "return x * x"Input: "for i in range(n):"
Target: "sum += i"(['def func(x):', 'x = x + 1', 'return x'],
['x = x + 1', 'return x', 'print(func(5))'])
```* Process Flowchart
```txt
Parse Python Files ─> Build Dataset ─> Train Model ─> Test Model
│ │ │ │
File Parsing Vocabulary Training Loop Predict
│ Creation ↓ ↓
Input/Target Pairs ─> DataLoader ─> Loss Optimization ─> Generate Output```
## Achieve the target effect
![](./demo/eg1.png)
![](./demo/eg2.png)
![](./demo/eg3.png)
![](./demo/eg4.png)