CodeLlama-13B-QML / README.md
PeterSchneider's picture
Update README.md
aef40b4 verified
|
raw
history blame
2.93 kB
metadata
license: llama2
base_model:
  - meta-llama/CodeLlama-13b-hf
tags:
  - QML
  - Code-Completion

Model Overview

Description:

CodeLlama-13B-QML is a large language model customized by the Qt Company for Fill-In-The-Middle code completion tasks in the QML programming language, especially for Qt Quick Controls compliant with Qt 6 releases. The CodeLlama-13B-QML model is designed for companies and individuals that want to self-host their LLM for HMI (Human Machine Interface) software development instead of relying on third-party hosted LLMs.

This model reaches a score of 79% on the QML100 Fill-In-The-Middle code completion benchmark for Qt6-compliant code. In comparison, GPT4o scored 62%, Claude 3.5 Sonnet scored 68%, and the base CodeLlama-13B-hf 66%. This model was fine-tuned based on raw data from over 4000 human-created QML code snippets using the LoRa fine-tuning method. CodeLlama-13B-QML is not optimised for the creation of Qt5-release compliant, C++, or Python code.

Terms of use:

By accessing this model, you are agreeing to the Llama 2 terms and conditions of the license, acceptable use policy and Meta’s privacy policy. By using this model, you are furthermore agreeing to the Qt AI Model terms & conditions.

Usage:

Large language models, including CodeLlama-13B-QML, are not designed to be deployed in isolation but instead should be deployed as part of an overall AI system with additional safety guardrails as required. Developers are expected to deploy system safeguards when building AI systems.

How to run CodeLlama 13B-QML in ollama:

Note: These instructions are written for ollama version 0.5.7.

1. Install ollama

https://ollama.com/download

2. Download the model repository

3. Open the terminal and go to the repository

4. Build the model in ollama

ollama create <your-model-name> -f Modelfile
e.g. ollama create customcodellama13bqml -f Modelfile

5. Run the model

ollama run <your-model-name>
e.g. ollama run customcodellame13bqml

You can start writing prompts in the terminal or send curl requests now.

Here is a curl request example:

curl -X POST http://localhost:11434/api/generate -d '{
  "model": "codellama13bqml",
  "Prompt": "<SUF>\n    title: qsTr(\"Hello World\")\n}<PRE>import QtQuick\n\nWindow {\n    width: 640\n    height: 480\n    visible: true\n<MID>",
  "stream": false,
  "temperature": 0.4,
  "top_p": 0.9,
  "repeat_penalty": 1.1,
  "num_predict": 300,
  "stop": ["<SUF>", "<PRE>", "</PRE>", "</SUF>", "< EOT >", "\\end", "<MID>", "</MID>", "##"]
}'

The prompt format:

"<SUF>{suffix}<PRE>{prefix}<MID>"

If there is no suffix, please use:

"<PRE>{prefix}<MID>"

Model Version:

v1.0