Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Snowflake/Arctic-Text2SQL-R1-7B
|
| 4 |
+
tags:
|
| 5 |
+
- llamafile
|
| 6 |
+
- text-to-sql
|
| 7 |
+
- gguf
|
| 8 |
+
- qwen2
|
| 9 |
+
- reasoning
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Snowflake Arctic-Text2SQL-R1-7B - Llamafile
|
| 13 |
+
|
| 14 |
+
This repository provides a standalone, cross-platform executable [llamafile](https://github.com/mozilla-ai/llamafile) for [Snowflake/Arctic-Text2SQL-R1-7B](https://huggingface.co/Snowflake/Arctic-Text2SQL-R1-7B).
|
| 15 |
+
|
| 16 |
+
## What is a Llamafile?
|
| 17 |
+
|
| 18 |
+
A llamafile bundles the `llamafile` inference runtime together with model weights (`Q4_K_M` quantization) and default parameters into a single executable file. It runs locally on Linux, macOS, and Windows without needing Python, PyTorch, or package installations.
|
| 19 |
+
|
| 20 |
+
## Quick Start
|
| 21 |
+
|
| 22 |
+
### 1. Download & Make Executable
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
curl -L -o arctic-text2sql-r1-7b.llamafile https://huggingface.co/MigueldsBatista/Arctic-Text2SQL-R1-7B-llamafile/resolve/main/arctic-text2sql-r1-7b.llamafile
|
| 26 |
+
chmod +x arctic-text2sql-r1-7b.llamafile
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
### 2. Run Interactive / CLI Mode
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
./arctic-text2sql-r1-7b.llamafile --cli -p "<|im_start|>user
|
| 33 |
+
Write a SQL query to list all department names.
|
| 34 |
+
<|im_end|>
|
| 35 |
+
<|im_start|>assistant
|
| 36 |
+
"
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
### 3. Run Server Mode (OpenAI-compatible API)
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
./arctic-text2sql-r1-7b.llamafile --server --port 8080
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Access the API at `http://localhost:8080/v1/chat/completions`.
|
| 46 |
+
|
| 47 |
+
## Hardware Acceleration Notes
|
| 48 |
+
|
| 49 |
+
- **GPU Acceleration**: Built-in CUDA acceleration works out-of-the-box on supported NVIDIA GPUs.
|
| 50 |
+
- **CPU Fallback / Blackwell GPUs**: For architectures not yet bundled in upstream llamafile (e.g. RTX 50-series sm_120) or systems without a dedicated GPU, append `--gpu disable`.
|