Fleece is a Visual Studio Code extension that allows developers to generate code using natural language. It's powered by dalai, an open source project that uses llama.cpp and alpaca.cpp language models to understand and interpret natural language.
The above demo showcases the comment-to-code feature of Fleece in real-time on an M1 Mac.
- Install Dalai globally:
npm install dalai -g
Follow the steps here to install the models via dalai's readme.
Install the Fleece extension from the VSCode extension marketplace or by building it from this repo or downloading the latest
.vsix release in this repo.
Fleece currently has one feature: comment-to-code. An indicator for the hotkeys to trigger comment-to-code will show up automatically on comments. Simply press
command+option+c on Mac to trigger the process. This will automatically start a Dalai server and send the comment as a request.
Note that Fleece is limited by the model used and the training data, so it's only as good as the Llama or Alpaca model. More features like autocomplete or language chatbot to answer questions will be added in the future.
Local Building and Installation
- Clone the repository:
git clone firstname.lastname@example.org:keldenl/fleece.git
vsce globally (if not already installed):
npm install -g @vscode/vsce
- In the cloned repository, run the following command to generate a
This should generate a
.vsix file, which can be installed in VS Code via the command palette (
Ctrl+Shift+P) using the "Extensions: Install from VSIX..." command.
Alternatively, you can also build and run Fleece locally in VS Code using the following steps:
- Open the cloned repository in VS Code
F5 to start a local build and launch an instance of VS Code with the Fleece extension
- Use the extension in the launched instance of VS Code
Contributions to Fleece are welcome! To contribute, follow these guidelines:
- Clone the repo.
- Create a new branch.
- Make your changes and commit them.
- Open a pull request (PR) and describe your changes.
- Collaborators will review the changes and approve/merge if they are satisfactory.
When contributing to Fleece, please follow these coding guidelines:
- Write clean and readable code with proper indentation and comments.
- Use meaningful and descriptive variable and function names.
- Keep functions short and focused on one task.
- Test your code thoroughly before committing changes.
Note that the model weights are only to be used for research purposes, as they are derivative of LLaMA, and uses the published instruction data from the Stanford Alpaca project which is generated by OpenAI, which itself disallows the usage of its outputs to train competing models.