初始化项目,由ModelHub XC社区提供模型
Model: Liquid1/llama-3-8b-liquid-coding-agent Source: Original Platform
This commit is contained in:
39
.gitattributes
vendored
Normal file
39
.gitattributes
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
unsloth.F16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
unsloth.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
llama-3-8b-liquid-coding-agent.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
llama-3-8b-liquid-coding-agent.F16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
118
README.md
Normal file
118
README.md
Normal file
@@ -0,0 +1,118 @@
|
||||
---
|
||||
base_model: unsloth/llama-3-8b-Instruct-bnb-4bit
|
||||
language:
|
||||
- en
|
||||
license: apache-2.0
|
||||
tags:
|
||||
- llama
|
||||
- gguf
|
||||
---
|
||||
|
||||
# Trained For: Coding with Extractable Tags
|
||||
|
||||
This model has been trained on coding wrapped in special tags.
|
||||
|
||||
# Example System Prompt
|
||||
```
|
||||
You are a master developer, when giving the user code you complete the entire project including all files needed and a usage example.
|
||||
You should provide all the code needed for the entire project ready to use.
|
||||
|
||||
Your output fill follow a XML style tag or multiple tags for multiple items.
|
||||
All blocks of code will be wrapped in <codestart> and <codeend> tags each codestart tag will contain some information on file contents.
|
||||
|
||||
Include the paramters in the codestart tag:
|
||||
- type: The type of content, text, python, css, javascript, typescript, markdown, csharp etc.
|
||||
- isFile: If this file is to be saved in the project.
|
||||
- title: The title of the file, simple and concise.
|
||||
- file: This is the path to the file in the project. Should be valid file name and path. Required if isFile set to true.
|
||||
|
||||
Here are some examples:
|
||||
<codestart type=\"text\" isFile=\"false\" title=\"Project Structure\">CODE HERE</codeend>
|
||||
<codestart type=\"text\" isFile=\"true\" title=\"Pip Requirments\" file=\"/file_name.txt\">TEXT HERE</codeend>
|
||||
<codestart type=\"python\" isFile=\"true\" title=\"Main Application File\" file=\"/file_name.py\">PYTHON CODE HERE</codeend>
|
||||
<codestart type=\"css\" isFile=\"true\" title=\"CSS File\" file=\"/path_to_file/file_name.css\">CSS HERE</codeend>
|
||||
<codestart type=\"markdown\" isFile=\"false\" title=\"Example Usage\">MARKDOWN HERE</codeend>
|
||||
|
||||
|
||||
You should leverage local technology instead of paid/remote services example: SQLite over MySQL unless requested to use specific technology or it is a better choice.
|
||||
Make sure to always use the codestart and codeend tags, you can have multiple sets of tags per response if needed.
|
||||
```
|
||||
|
||||
|
||||
# Tests:
|
||||
|
||||
**User Input**: Write a python program for a simple restful api
|
||||
|
||||
**Output**:
|
||||
```
|
||||
Here is an example of a simple RESTful API using Flask in Python:
|
||||
<codestart type="python" isFile="true" title="Main Application File" file="/main.py">
|
||||
import flask
|
||||
from flask import request, jsonify
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
# A sample data store (you would replace this with your own data storage)
|
||||
people = [
|
||||
{"id": 1,
|
||||
"name": "John",
|
||||
"age": 30},
|
||||
{"id": 2,
|
||||
"name": "Jane",
|
||||
"age": 25}
|
||||
]
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
def index():
|
||||
return "<h1>RESTful API</h1>"
|
||||
|
||||
@app.route('/api/person', methods=['GET'])
|
||||
def get_all_persons():
|
||||
return jsonify(people)
|
||||
|
||||
@app.route('/api/person/<int:id>', methods=['GET'])
|
||||
def get_person(id):
|
||||
result = next((i for i in people if i["id"] == id), None)
|
||||
if not result:
|
||||
return "Person not found", 404
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/api/person', methods=['POST'])
|
||||
def add_person():
|
||||
new_person = {
|
||||
"id": len(people) + 1,
|
||||
"name": request.json['name'],
|
||||
"age": request.json['age']
|
||||
}
|
||||
people.append(new_person)
|
||||
return jsonify(new_person), 201
|
||||
|
||||
@app.route('/api/person/<int:id>', methods=['PUT'])
|
||||
def update_person(id):
|
||||
result = next((i for i in people if i["id"] == id), None)
|
||||
if not result:
|
||||
return "Person not found", 404
|
||||
result["name"] = request.json.get('name', result["name"])
|
||||
result["age"] = request.json.get('age', result["age"])
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/api/person/<int:id>', methods=['DELETE'])
|
||||
def delete_person(id):
|
||||
global people
|
||||
people[:] = [p for p in people if p["id"] != id]
|
||||
return "Person deleted", 200
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
</codeend>
|
||||
|
||||
You can run this application with `python main.py` and access it through your web browser at `http://localhost:5000`. The API has the following endpoints:
|
||||
|
||||
- GET /api/person: Returns a list of all persons.
|
||||
- GET /api/person/<int:id>: Returns a specific person by ID.
|
||||
- POST /api/person: Adds a new person to the list.
|
||||
- PUT /api/person/<int:id>: Updates an existing person.
|
||||
- DELETE /api/person/<int:id>: Deletes a person.
|
||||
|
||||
Please note that this is a very simple example and in a real application you would likely want to handle errors more robustly, add authentication and authorization, etc.
|
||||
```
|
||||
3
config.json
Normal file
3
config.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"model_type": "llama"
|
||||
}
|
||||
3
llama-3-8b-liquid-coding-agent.F16.gguf
Normal file
3
llama-3-8b-liquid-coding-agent.F16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1fe6d072926bed8ce842a10ab3a4e5368148a4440f10cefe12306cebb67d8cd3
|
||||
size 16068890976
|
||||
3
llama-3-8b-liquid-coding-agent.Q4_K_M.gguf
Normal file
3
llama-3-8b-liquid-coding-agent.Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf0e7bf7eabf1e6fd2f47139839907147d595c3bdde5952286b677f1c63ec158
|
||||
size 4920734048
|
||||
Reference in New Issue
Block a user