Lim Chee Kin commited on
Commit ·
106db30
0
Parent(s):
Duplicate from limcheekin/WizardCoder-Python-13B-V1.0-GGUF
Browse filesFiles changed (7)
- .gitattributesAdded+35
- DockerfileAdded+35
- LICENSEAdded+21
- README.mdAdded+21
- index.htmlAdded+37
- main.pyAdded+27
- start_server.shAdded+6
1234567891011121314151617181920212223242526272829303132333435*.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 -textsaved_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 -text1234567891011121314151617181920212223242526272829303132333435# Grab a fresh copy of the Python imageFROM python:3.10-slim
# Install build and runtime dependenciesRUN apt-get update && \ apt-get install -y \ libopenblas-dev \ ninja-build \ build-essential \ pkg-config \ curl
RUN pip install -U pip setuptools wheel && \ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" FORCE_CMAKE=1 pip install --verbose llama-cpp-python[server]
# Download modelRUN mkdir model && \ curl -L https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGUF/resolve/main/wizardcoder-python-13b-v1.0.Q5_K_M.gguf -o model/gguf-model.bin
COPY ./start_server.sh ./COPY ./main.py ./COPY ./index.html ./
# Make the server start script executableRUN chmod +x ./start_server.sh
# Set environment variable for the hostENV HOST=0.0.0.0ENV PORT=7860
# Expose a port for the serverEXPOSE ${PORT}
# Run the server start scriptCMD ["/bin/sh", "./start_server.sh"] 123456789101112131415161718192021MIT License
Copyright (c) 2023 Lim Chee Kin
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021---title: WizardCoder-Python-13B-V1.0-GGUF (Q5_K_M)colorFrom: purplecolorTo: bluesdk: dockermodels:- WizardLM/WizardCoder-Python-13B-V1.0- TheBloke/WizardCoder-Python-13B-V1.0-GGUFtags:- inference api- openai-api compatible- llama-cpp-python- WizardCoder-Python-13B-V1.0- ggufpinned: falseduplicated_from: limcheekin/WizardCoder-Python-13B-V1.0-GGUF---
# orca_mini_v3_7B-GGUF (Q5_K_M)
Please refer to the [index.html](index.html) for more information.12345678910111213141516171819202122232425262728293031323334353637<!DOCTYPE html><html> <head> <title>WizardCoder-Python-13B-V1.0-GGUF (Q5_K_M)</title> </head> <body> <h1>WizardCoder-Python-13B-V1.0-GGUF (Q5_K_M)</h1> <p> With the utilization of the <a href="https://github.com/abetlen/llama-cpp-python">llama-cpp-python</a> package, we are excited to introduce the GGUF model hosted in the Hugging Face Docker Spaces, made accessible through an OpenAI-compatible API. This space includes comprehensive API documentation to facilitate seamless integration. </p> <ul> <li> The API endpoint: <a href="https://limcheekin-wizardcoder-python-13b-v1-0-gguf.hf.space/v1" >https://limcheekin-wizardcoder-python-13b-v1-0-gguf.hf.space/v1</a > </li> <li> The API doc: <a href="https://limcheekin-wizardcoder-python-13b-v1-0-gguf.hf.space/docs" >https://limcheekin-wizardcoder-python-13b-v1-0-gguf.hf.space/docs</a > </li> </ul> <p> If you find this resource valuable, your support in the form of starring the space would be greatly appreciated. Your engagement plays a vital role in furthering the application for a community GPU grant, ultimately enhancing the capabilities and accessibility of this space. </p> </body></html>123456789101112131415161718192021222324252627from llama_cpp.server.app import create_app, Settingsfrom fastapi.responses import HTMLResponseimport os
app = create_app( Settings( n_threads=2, # set to number of cpu cores model="model/gguf-model.bin", embedding=False ))
# Read the content of index.html once and store it in memorywith open("index.html", "r") as f: content = f.read()
@app.get("/", response_class=HTMLResponse)async def read_items(): return content
if __name__ == "__main__": import uvicorn uvicorn.run(app, host=os.environ["HOST"], port=int(os.environ["PORT"]) )123456#!/bin/sh
# For mlock supportulimit -l unlimited
python3 -B main.py.gitattributesAdded+35
DockerfileAdded+35
LICENSEAdded+21
README.mdAdded+21
index.htmlAdded+37
main.pyAdded+27
start_server.shAdded+6