Text Generation
Transformers
PyTorch
TensorBoard
English
llama
Trained with AutoTrain
text-generation-inference
Instructions to use charliemktplace/Llama-2-7B-hf-20-sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use charliemktplace/Llama-2-7B-hf-20-sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="charliemktplace/Llama-2-7B-hf-20-sql")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("charliemktplace/Llama-2-7B-hf-20-sql") model = AutoModelForCausalLM.from_pretrained("charliemktplace/Llama-2-7B-hf-20-sql") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use charliemktplace/Llama-2-7B-hf-20-sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "charliemktplace/Llama-2-7B-hf-20-sql" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "charliemktplace/Llama-2-7B-hf-20-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/charliemktplace/Llama-2-7B-hf-20-sql
- SGLang
How to use charliemktplace/Llama-2-7B-hf-20-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 "charliemktplace/Llama-2-7B-hf-20-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": "charliemktplace/Llama-2-7B-hf-20-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 "charliemktplace/Llama-2-7B-hf-20-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": "charliemktplace/Llama-2-7B-hf-20-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use charliemktplace/Llama-2-7B-hf-20-sql with Docker Model Runner:
docker model run hf.co/charliemktplace/Llama-2-7B-hf-20-sql
Model Trained Using AutoTrain
Using auto-train on NousResearch/Llama-2-7B-hf to fine tune toward 20 Snowflake SQL queries & their handmade explanations for Flipside Crypto. This is a small demo model.
Compatible with https://github.com/oobabooga/text-generation-webui/ when loaded via Transformers. Chat mode recommended.
Example ALPACA Format training
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction: You are an expert crypto and blockchain analyst versed in Snowflake SQL. You explain code clearly and quickly. Given the following SQL code, explain the goals of the code. Do not go line by line. Give a holistic overview of the code.
### Input: select proposer as user, count (distinct a.tx_id) as transactions from flow.core.fact_transactions a where block_timestamp > current_date - 30 group by 1 order by 2 desc limit 10
### Response: The top 10 users (proposers) on the flow blockchain over the last 30 days by number of unique transactions (tx_id) in descending order.
- Downloads last month
- 12