Downloads · 30 days
28
4% of all-time downloads
bingal/Qwen1.5-7B-Chat-llamafile
Qwen1.5-7B-Chat-llamafile is a machine learning model from bingal. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
<a href="https://github.com/Mozilla-Ocho/llamafile" target="blank"github</a<br/ <a href="https://www.bingal.com/posts/ai-llamafile-usage/" target="blank"llamafile 中文说明</a<br/ <a href="https://www.modelscope.cn/models/…
Downloads · 30 days
28
4% of all-time downloads
All-time downloads
701
Public
Repo size
5.6 GB
Likes
2
Public
Click a slice to open those files.
.llamafile5.6 GB · 100%
From the Hugging Face model README
<a href="https://github.com/Mozilla-Ocho/llamafile" target="_blank">github</a><br/> <a href="https://www.bingal.com/posts/ai-llamafile-usage/" target="_blank">llamafile 中文说明</a><br/> <a href="https://www.modelscope.cn/models/bingal/llamafile-models/summary" target="_blank">The llamafile model collection in modelscope.cn</a><br/> <a href="https://www.modelscope.cn/models/bingal/Qwen1.5-7B-Chat-llamafile/summary" target="_blank">Qwen1.5-7B-Chat-llamafile in modelscope.cn</a>
The Windows system has a limitation where it does not support a single exe file over 4GB, so it is necessary to download the llamafile and gguf models separately and run them individually. In addition, you can also use the Windows Subsystem for Linux (WSL) to run it, which can bypass the 4GB limit as well.
llamafile-0.6.2.exe\llamafile-0.6.2.exe .\qwen1_5-7b-chat-q5_k_m.gguf -ngl 9999 --host 0.0.0.0 --port 8080chmod +x ./qwen1.5-7b-chat-q5_k_m.llamafile./qwen1.5-7b-chat-q5_k_m.llamafilehttp://127.0.0.1:8080/v1#!/usr/bin/env python3
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8080/v1", # "http://<Your api-server IP>:port"
api_key = "sk-no-key-required"
)
completion = client.chat.completions.create(
model="LLaMA_CPP",
messages=[
{"role": "system", "content": "You are an AI assistant."},
{"role": "user", "content": "Write a story about dragon"}
]
)
print(completion.choices[0].message)
-ngl 9999 indicates how many layers of the model are placed on the GPU to run, with the rest running on the CPU. If there is no GPU available, it can be set to -ngl 0. The default is 9999, which means everything runs on the GPU (drivers and CUDA runtime environment must be installed).--host 0.0.0.0 is the hostname for the web service. If only local access is needed, it can be set to --host 127.0.0.1. If set to 0.0.0.0, it can be accessed via IP within the network.--port 8080 is the port for the web service, with the default being 8080, which can be modified using this parameter.-t 16 is the number of threads. When running on the CPU, you can set the number of cores to run concurrently based on the CPU core count.--help.