Add model card
Browse files
README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: llama.cpp
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
license: apache-2.0
|
7 |
+
quantization: q4_k_m
|
8 |
+
---
|
9 |
+
|
10 |
+
# LLaMa_3.2_3B_Instruct_Text2SQL-Q4_K_M-GGUF.gguf
|
11 |
+
|
12 |
+
This is a GGUF quantized version of the LLaMa 3.2 3B Text2SQL model.
|
13 |
+
|
14 |
+
## Model Details
|
15 |
+
- **Architecture:** LLaMa 3.2 3B
|
16 |
+
- **Task:** Text to SQL Generation
|
17 |
+
- **Quantization:** Q4_K_M
|
18 |
+
- **Context Length:** 65536 tokens (2^16)
|
19 |
+
- **Format:** GGUF (Compatible with llama.cpp)
|
20 |
+
|
21 |
+
## Usage
|
22 |
+
|
23 |
+
```python
|
24 |
+
from llama_cpp import Llama
|
25 |
+
|
26 |
+
# Initialize model
|
27 |
+
llm = Llama(
|
28 |
+
model_path="downloaded_model.gguf",
|
29 |
+
n_ctx=65536, # 64K context
|
30 |
+
n_threads=8 # Adjust based on your CPU
|
31 |
+
)
|
32 |
+
|
33 |
+
# Generate SQL
|
34 |
+
response = llm(
|
35 |
+
"Convert this to SQL: Find all users who signed up in January 2024",
|
36 |
+
max_tokens=1024,
|
37 |
+
temperature=0.7
|
38 |
+
)
|
39 |
+
|
40 |
+
print(response['choices'][0]['text'])
|
41 |
+
```
|
42 |
+
|
43 |
+
## Model Source
|
44 |
+
This is a quantized version of [XeAI/LLaMa_3.2_3B_Instruct_Text2SQL](https://huggingface.co/XeAI/LLaMa_3.2_3B_Instruct_Text2SQL)
|