How to use from
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 "skar01/llama2-coder-full" \
    --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": "skar01/llama2-coder-full",
		"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 "skar01/llama2-coder-full" \
        --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": "skar01/llama2-coder-full",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Llama2 (7B) model fine-tuned on the CodeAlpaca 20k instructions dataset by using the method QLoRA with PEFT library.

Training and evaluation data 📚

CodeAlpaca_20K: contains 20K instruction-following data used for fine-tuning the Code Alpaca model. Data is here: https://huggingface.co/mrm8488/falcon-7b-ft-codeAlpaca_20k The adapter is here: https://huggingface.co/skar01/llama2-coder The base model is: TinyPixel/Llama-2-7B-bf16-sharded

Downloads last month
10
Inference Providers NEW