Instructions to use zenlm/zen-sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zenlm/zen-sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zenlm/zen-sql")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zenlm/zen-sql", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use zenlm/zen-sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zenlm/zen-sql" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenlm/zen-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zenlm/zen-sql
- SGLang
How to use zenlm/zen-sql with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zenlm/zen-sql" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenlm/zen-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zenlm/zen-sql" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenlm/zen-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zenlm/zen-sql with Docker Model Runner:
docker model run hf.co/zenlm/zen-sql
feat: AI safety research positioning
Browse files
README.md
CHANGED
|
@@ -18,7 +18,9 @@ base_model: zenlm/zen4
|
|
| 18 |
|
| 19 |
> **Parameters**: 7B | **Architecture**: Zen 4 Architecture | **Context**: 32K | **License**: Apache 2.0 | **Released**: 2024-11-15
|
| 20 |
|
| 21 |
-
SQL
|
|
|
|
|
|
|
| 22 |
|
| 23 |
Base weights: [zenlm/zen4](https://huggingface.co/zenlm/zen4)
|
| 24 |
|
|
@@ -36,11 +38,8 @@ print(tokenizer.decode(output[0][inputs.input_ids.shape[-1]:], skip_special_toke
|
|
| 36 |
---
|
| 37 |
## The Zen LM Family
|
| 38 |
|
| 39 |
-
Joint research
|
| 40 |
-
- **Hanzo AI** (Techstars '17) — AI infrastructure, API gateway, inference optimization
|
| 41 |
-
- **Zoo Labs Foundation** (501c3) — Open AI research, ZIPs governance, decentralized training
|
| 42 |
-
- **Lux Partners Limited** — Compute coordination and settlement layer
|
| 43 |
|
| 44 |
All weights Apache 2.0. Download, run locally, fine-tune, deploy commercially.
|
| 45 |
|
| 46 |
-
[HuggingFace](https://huggingface.co/zenlm) · [Chat
|
|
|
|
| 18 |
|
| 19 |
> **Parameters**: 7B | **Architecture**: Zen 4 Architecture | **Context**: 32K | **License**: Apache 2.0 | **Released**: 2024-11-15
|
| 20 |
|
| 21 |
+
SQL specialist for complex query generation, schema design, query optimization, and database documentation.
|
| 22 |
+
|
| 23 |
+
Supports PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, and more.
|
| 24 |
|
| 25 |
Base weights: [zenlm/zen4](https://huggingface.co/zenlm/zen4)
|
| 26 |
|
|
|
|
| 38 |
---
|
| 39 |
## The Zen LM Family
|
| 40 |
|
| 41 |
+
Joint research between **Hanzo AI** (Techstars '17), **Zoo Labs Foundation** (501c3), and **Lux Partners Limited**.
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
All weights Apache 2.0. Download, run locally, fine-tune, deploy commercially.
|
| 44 |
|
| 45 |
+
[HuggingFace](https://huggingface.co/zenlm) · [Chat](https://hanzo.chat) · [API](https://api.hanzo.ai) · [Docs](https://zenlm.org)
|