Instructions to use Liquid1/llama-3-8b-liquid-coding-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Liquid1/llama-3-8b-liquid-coding-agent with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Liquid1/llama-3-8b-liquid-coding-agent", dtype="auto") - llama-cpp-python
How to use Liquid1/llama-3-8b-liquid-coding-agent with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Liquid1/llama-3-8b-liquid-coding-agent", filename="llama-3-8b-liquid-coding-agent.F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Liquid1/llama-3-8b-liquid-coding-agent with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Liquid1/llama-3-8b-liquid-coding-agent:F16 # Run inference directly in the terminal: llama-cli -hf Liquid1/llama-3-8b-liquid-coding-agent:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Liquid1/llama-3-8b-liquid-coding-agent:F16 # Run inference directly in the terminal: llama-cli -hf Liquid1/llama-3-8b-liquid-coding-agent:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Liquid1/llama-3-8b-liquid-coding-agent:F16 # Run inference directly in the terminal: ./llama-cli -hf Liquid1/llama-3-8b-liquid-coding-agent:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Liquid1/llama-3-8b-liquid-coding-agent:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Liquid1/llama-3-8b-liquid-coding-agent:F16
Use Docker
docker model run hf.co/Liquid1/llama-3-8b-liquid-coding-agent:F16
- LM Studio
- Jan
- Ollama
How to use Liquid1/llama-3-8b-liquid-coding-agent with Ollama:
ollama run hf.co/Liquid1/llama-3-8b-liquid-coding-agent:F16
- Unsloth Studio
How to use Liquid1/llama-3-8b-liquid-coding-agent with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Liquid1/llama-3-8b-liquid-coding-agent to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Liquid1/llama-3-8b-liquid-coding-agent to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Liquid1/llama-3-8b-liquid-coding-agent to start chatting
- Docker Model Runner
How to use Liquid1/llama-3-8b-liquid-coding-agent with Docker Model Runner:
docker model run hf.co/Liquid1/llama-3-8b-liquid-coding-agent:F16
- Lemonade
How to use Liquid1/llama-3-8b-liquid-coding-agent with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Liquid1/llama-3-8b-liquid-coding-agent:F16
Run and chat with the model
lemonade run user.llama-3-8b-liquid-coding-agent-F16
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ tags:
|
|
| 8 |
- gguf
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# Trained For:
|
| 12 |
|
| 13 |
This model has been trained on coding wrapped in special tags.
|
| 14 |
|
|
@@ -41,6 +41,78 @@ Make sure to always use the codestart and codeend tags, you can have multiple se
|
|
| 41 |
|
| 42 |
# Tests:
|
| 43 |
|
| 44 |
-
**User Input**:
|
| 45 |
|
| 46 |
-
**Output**:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- gguf
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Trained For: Coding with Extractable Tags
|
| 12 |
|
| 13 |
This model has been trained on coding wrapped in special tags.
|
| 14 |
|
|
|
|
| 41 |
|
| 42 |
# Tests:
|
| 43 |
|
| 44 |
+
**User Input**: Write a python program for a simple restful api
|
| 45 |
|
| 46 |
+
**Output**:
|
| 47 |
+
```
|
| 48 |
+
Here is an example of a simple RESTful API using Flask in Python:
|
| 49 |
+
<codestart type="python" isFile="true" title="Main Application File" file="/main.py">
|
| 50 |
+
import flask
|
| 51 |
+
from flask import request, jsonify
|
| 52 |
+
|
| 53 |
+
app = flask.Flask(__name__)
|
| 54 |
+
|
| 55 |
+
# A sample data store (you would replace this with your own data storage)
|
| 56 |
+
people = [
|
| 57 |
+
{"id": 1,
|
| 58 |
+
"name": "John",
|
| 59 |
+
"age": 30},
|
| 60 |
+
{"id": 2,
|
| 61 |
+
"name": "Jane",
|
| 62 |
+
"age": 25}
|
| 63 |
+
]
|
| 64 |
+
|
| 65 |
+
@app.route('/', methods=['GET'])
|
| 66 |
+
def index():
|
| 67 |
+
return "<h1>RESTful API</h1>"
|
| 68 |
+
|
| 69 |
+
@app.route('/api/person', methods=['GET'])
|
| 70 |
+
def get_all_persons():
|
| 71 |
+
return jsonify(people)
|
| 72 |
+
|
| 73 |
+
@app.route('/api/person/<int:id>', methods=['GET'])
|
| 74 |
+
def get_person(id):
|
| 75 |
+
result = next((i for i in people if i["id"] == id), None)
|
| 76 |
+
if not result:
|
| 77 |
+
return "Person not found", 404
|
| 78 |
+
return jsonify(result)
|
| 79 |
+
|
| 80 |
+
@app.route('/api/person', methods=['POST'])
|
| 81 |
+
def add_person():
|
| 82 |
+
new_person = {
|
| 83 |
+
"id": len(people) + 1,
|
| 84 |
+
"name": request.json['name'],
|
| 85 |
+
"age": request.json['age']
|
| 86 |
+
}
|
| 87 |
+
people.append(new_person)
|
| 88 |
+
return jsonify(new_person), 201
|
| 89 |
+
|
| 90 |
+
@app.route('/api/person/<int:id>', methods=['PUT'])
|
| 91 |
+
def update_person(id):
|
| 92 |
+
result = next((i for i in people if i["id"] == id), None)
|
| 93 |
+
if not result:
|
| 94 |
+
return "Person not found", 404
|
| 95 |
+
result["name"] = request.json.get('name', result["name"])
|
| 96 |
+
result["age"] = request.json.get('age', result["age"])
|
| 97 |
+
return jsonify(result)
|
| 98 |
+
|
| 99 |
+
@app.route('/api/person/<int:id>', methods=['DELETE'])
|
| 100 |
+
def delete_person(id):
|
| 101 |
+
global people
|
| 102 |
+
people[:] = [p for p in people if p["id"] != id]
|
| 103 |
+
return "Person deleted", 200
|
| 104 |
+
|
| 105 |
+
if __name__ == '__main__':
|
| 106 |
+
app.run()
|
| 107 |
+
</codeend>
|
| 108 |
+
|
| 109 |
+
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:
|
| 110 |
+
|
| 111 |
+
- GET /api/person: Returns a list of all persons.
|
| 112 |
+
- GET /api/person/<int:id>: Returns a specific person by ID.
|
| 113 |
+
- POST /api/person: Adds a new person to the list.
|
| 114 |
+
- PUT /api/person/<int:id>: Updates an existing person.
|
| 115 |
+
- DELETE /api/person/<int:id>: Deletes a person.
|
| 116 |
+
|
| 117 |
+
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.
|
| 118 |
+
```
|