Instructions to use compilade/quant-tests with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use compilade/quant-tests with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf compilade/quant-tests:F16 # Run inference directly in the terminal: llama cli -hf compilade/quant-tests:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf compilade/quant-tests:F16 # Run inference directly in the terminal: llama cli -hf compilade/quant-tests: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 compilade/quant-tests:F16 # Run inference directly in the terminal: ./llama-cli -hf compilade/quant-tests: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 compilade/quant-tests:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf compilade/quant-tests:F16
Use Docker
docker model run hf.co/compilade/quant-tests:F16
- LM Studio
- Jan
- Ollama
How to use compilade/quant-tests with Ollama:
ollama run hf.co/compilade/quant-tests:F16
- Unsloth Studio
How to use compilade/quant-tests 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 compilade/quant-tests 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 compilade/quant-tests to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for compilade/quant-tests to start chatting
- Atomic Chat new
- Docker Model Runner
How to use compilade/quant-tests with Docker Model Runner:
docker model run hf.co/compilade/quant-tests:F16
- Lemonade
How to use compilade/quant-tests with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull compilade/quant-tests:F16
Run and chat with the model
lemonade run user.quant-tests-F16
List all available models
lemonade list
Avoid clearing the whole build directory
Browse files- bench-TriLMs.py +8 -4
bench-TriLMs.py
CHANGED
|
@@ -41,15 +41,19 @@ def gather_models(sizes: Sequence[str] = MODEL_SIZES):
|
|
| 41 |
|
| 42 |
def build_llama_cpp(options: Sequence[str]):
|
| 43 |
logger.info("Building llama.cpp")
|
| 44 |
-
os.chdir(LLAMA_CPP_PATH)
|
| 45 |
builddir = LLAMA_CPP_PATH / "build"
|
| 46 |
if builddir.exists():
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
os.chdir(builddir)
|
| 51 |
os.system(shlex.join(("cmake", "..", *options)))
|
| 52 |
os.system(f"make -j{os.cpu_count()} llama-bench llama-quantize test-backend-ops")
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
def quantize(types: Sequence[str] = ALL_TYPES, sizes: Sequence[str] = MODEL_SIZES):
|
|
|
|
| 41 |
|
| 42 |
def build_llama_cpp(options: Sequence[str]):
|
| 43 |
logger.info("Building llama.cpp")
|
|
|
|
| 44 |
builddir = LLAMA_CPP_PATH / "build"
|
| 45 |
if builddir.exists():
|
| 46 |
+
# Clear previous config
|
| 47 |
+
cmake_cache = builddir / "CMakeCache.txt"
|
| 48 |
+
cmake_files = builddir / "CMakeFiles"
|
| 49 |
+
logger.info("Removing %s and %s", cmake_cache, cmake_files)
|
| 50 |
+
os.system(shlex.join(("rm", "-rf", str(cmake_cache), str(cmake_files))))
|
| 51 |
+
builddir.mkdir(exist_ok=True)
|
| 52 |
+
old_cwd = os.path.curdir
|
| 53 |
os.chdir(builddir)
|
| 54 |
os.system(shlex.join(("cmake", "..", *options)))
|
| 55 |
os.system(f"make -j{os.cpu_count()} llama-bench llama-quantize test-backend-ops")
|
| 56 |
+
os.chdir(old_cwd)
|
| 57 |
|
| 58 |
|
| 59 |
def quantize(types: Sequence[str] = ALL_TYPES, sizes: Sequence[str] = MODEL_SIZES):
|