Run this model with HF Jobs
Run namuax/CypressTree-0.5-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/namuax/CypressTree-0.5-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/namuax/CypressTree-0.5-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/namuax/CypressTree-0.5-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/namuax/CypressTree-0.5-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use namuax/CypressTree-0.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use namuax/CypressTree-0.5-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="namuax/CypressTree-0.5-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("namuax/CypressTree-0.5-7B") model = AutoModelForCausalLM.from_pretrained("namuax/CypressTree-0.5-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use namuax/CypressTree-0.5-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "namuax/CypressTree-0.5-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "namuax/CypressTree-0.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/namuax/CypressTree-0.5-7B
- SGLang
How to use namuax/CypressTree-0.5-7B 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 "namuax/CypressTree-0.5-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "namuax/CypressTree-0.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "namuax/CypressTree-0.5-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "namuax/CypressTree-0.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use namuax/CypressTree-0.5-7B with Docker Model Runner:
docker model run hf.co/namuax/CypressTree-0.5-7B
CypressTree-0.5-7B
๋ชจ๋ธ ์ค๋ช
์ด ๋ชจ๋ธ์ ํ ์คํธ(์์ฐ์ด)๋ฅผ SQL ์ฟผ๋ฆฌ๋ก ๋ณํํ๋ ๋ฐ ํนํ๋ Mistral-7B-Instruct-v0.3 ์ ๋ฏธ์ธ ์กฐ์ (Fine-Tuning) ๋ฒ์ ์ ๋๋ค.
- ๋ชจ๋ธ๋ช : CypressTree-0.5-7B
- ๊ธฐ๋ฐ ๋ชจ๋ธ: Mistral-7B-Instruct-v0.3
- ๊ธฐ๋ฐ ๋ชจ๋ธ ์ค๋ช : Mistral-7B-v0.3์ ๋ช ๋ น์ด์ ๋ง๊ฒ ๋ฏธ์ธ ์กฐ์ (Instruct Fine-Tuned)ํ ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ(LLM)์ ๋๋ค. Mistral-7B-v0.2 ๋๋น ํ์ฅ๋ 32768 ์ดํ, v3 ํ ํฌ๋์ด์ , ํจ์ ํธ์ถ ์ง์ ๋ฑ์ ๊ฐ์ ์ฌํญ์ ํฌํจํฉ๋๋ค.
- ํ์ต ๋ฐ์ดํฐ์ : gretelai/synthetic_text_to_sql
- ๋ฐ์ดํฐ์ ์ค๋ช : Gretel Navigator๋ฅผ ํ์ฉํ์ฌ ์์ฑ๋ ๊ณ ํ์ง์ text-to-sql ์ํ๋ก ๊ตฌ์ฑ๋ ํ๋ถํ ๋ฐ์ดํฐ์ ์ด๋ฉฐ, Apache 2.0 ๋ผ์ด์ ์ค๋ก ๋ฐฐํฌ๋ฉ๋๋ค.
ํ๋กฌํํธ ํ ํ๋ฆฟ
<s>
### Instruction:
{question}
### Context:
{schema}
### Response:
์ฌ์ฉ๋ฒ
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "namuai-x/CypressTree-0.5-7B"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
text = """<s>
### Instruction:
What is the total volume of timber sold by each salesperson, sorted by salesperson?
### Context:
CREATE TABLE salesperson (salesperson_id INT, name TEXT, region TEXT); INSERT INTO salesperson (salesperson_id, name, region) VALUES (1, 'John Doe', 'North'), (2, 'Jane Smith', 'South'); CREATE TABLE timber_sales (sales_id INT, salesperson_id INT, volume REAL, sale_date DATE); INSERT INTO timber_sales (sales_id, salesperson_id, volume, sale_date) VALUES (1, 1, 120, '2021-01-01'), (2, 1, 150, '2021-02-01'), (3, 2, 180, '2021-01-01');
### Response:
"""
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
inputs = tokenizer(text, return_tensors="pt")
inputs = {key: value.to(device) for key, value in inputs.items()}
outputs = model.generate(**inputs, max_new_tokens=300, pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
์ถ๋ ฅ ์์
### Instruction:
What is the total volume of timber sold by each salesperson, sorted by salesperson?
### Context:
CREATE TABLE salesperson (salesperson_id INT, name TEXT, region TEXT); INSERT INTO salesperson (salesperson_id, name, region) VALUES (1, 'John Doe', 'North'), (2, 'Jane Smith', 'South'); CREATE TABLE timber_sales (sales_id INT, salesperson_id INT, volume REAL, sale_date DATE); INSERT INTO timber_sales (sales_id, salesperson_id, volume, sale_date) VALUES (1, 1, 120, '2021-01-01'), (2, 1, 150, '2021-02-01'), (3, 2, 180, '2021-01-01');
### Response:
SELECT salesperson.name, SUM(timber_sales.volume) as total_volume FROM salesperson JOIN timber_sales ON salesperson.salesperson_id = timber_sales.salesperson_id GROUP BY salesperson.name ORDER BY total_volume DESC;
ํ๋์จ์ด ๋ฐ ์ํํธ์จ์ด
- ํ์ต ํ๋์จ์ด: 4๊ฐ์ Tesla V100-PCIE-32GB GPU
๋ผ์ด์ ์ค
- Apache-2.0
์ฐ๋ฝ์ฒ
CypressTree-0.5-7B
Model Description
This model is a fine-tuned version of Mistral-7B-Instruct-v0.3, specialized in converting natural language text into SQL queries.
- Model Name: CypressTree-0.5-7B
- Developed by: namuai-x
- Base Model: Mistral-7B-Instruct-v0.3
- Base Model Description: The Mistral-7B-Instruct-v0.3 Large Language Model (LLM) is an instruct fine-tuned version of Mistral-7B-v0.3. It includes improvements over Mistral-7B-v0.2, such as an extended vocabulary of 32768, v3 Tokenizer support, and function calling capabilities.
- Dataset Name: gretelai/synthetic_text_to_sql
- Dataset Description:
gretelai/synthetic_text_to_sqlis a rich dataset of high-quality synthetic Text-to-SQL samples, generated using Gretel Navigator and released under the Apache 2.0 license.
Prompt Template
<s>
### Instruction:
{question}
### Context:
{schema}
### Response:
How to Use it
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "namuai-x/CypressTree-0.5-7B"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
text = """<s>
### Instruction:
What is the total volume of timber sold by each salesperson, sorted by salesperson?
### Context:
CREATE TABLE salesperson (salesperson_id INT, name TEXT, region TEXT); INSERT INTO salesperson (salesperson_id, name, region) VALUES (1, 'John Doe', 'North'), (2, 'Jane Smith', 'South'); CREATE TABLE timber_sales (sales_id INT, salesperson_id INT, volume REAL, sale_date DATE); INSERT INTO timber_sales (sales_id, salesperson_id, volume, sale_date) VALUES (1, 1, 120, '2021-01-01'), (2, 1, 150, '2021-02-01'), (3, 2, 180, '2021-01-01');
### Response:
"""
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
inputs = tokenizer(text, return_tensors="pt")
inputs = {key: value.to(device) for key, value in inputs.items()}
outputs = model.generate(**inputs, max_new_tokens=300, pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Example Output
### Instruction:
What is the total volume of timber sold by each salesperson, sorted by salesperson?
### Context:
CREATE TABLE salesperson (salesperson_id INT, name TEXT, region TEXT); INSERT INTO salesperson (salesperson_id, name, region) VALUES (1, 'John Doe', 'North'), (2, 'Jane Smith', 'South'); CREATE TABLE timber_sales (sales_id INT, salesperson_id INT, volume REAL, sale_date DATE); INSERT INTO timber_sales (sales_id, salesperson_id, volume, sale_date) VALUES (1, 1, 120, '2021-01-01'), (2, 1, 150, '2021-02-01'), (3, 2, 180, '2021-01-01');
### Response:
SELECT salesperson.name, SUM(timber_sales.volume) as total_volume FROM salesperson JOIN timber_sales ON salesperson.salesperson_id = timber_sales.salesperson_id GROUP BY salesperson.name ORDER BY total_volume DESC;
Hardware and Software
- Training Hardware: 4 Tesla V100-PCIE-32GB GPUs
License
- Apache-2.0
Contact
- Downloads last month
- 8