Text Generation
Transformers
PyTorch
English
llama
facebook
meta
llama-2
functions
function calling
sharded
ggml
gptq
text-generation-inference
Instructions to use Trelis/Llama-2-7b-chat-hf-function-calling with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Trelis/Llama-2-7b-chat-hf-function-calling with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Trelis/Llama-2-7b-chat-hf-function-calling")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Trelis/Llama-2-7b-chat-hf-function-calling") model = AutoModelForCausalLM.from_pretrained("Trelis/Llama-2-7b-chat-hf-function-calling", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Trelis/Llama-2-7b-chat-hf-function-calling with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Trelis/Llama-2-7b-chat-hf-function-calling" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Trelis/Llama-2-7b-chat-hf-function-calling", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Trelis/Llama-2-7b-chat-hf-function-calling
- SGLang
How to use Trelis/Llama-2-7b-chat-hf-function-calling 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 "Trelis/Llama-2-7b-chat-hf-function-calling" \ --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": "Trelis/Llama-2-7b-chat-hf-function-calling", "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 "Trelis/Llama-2-7b-chat-hf-function-calling" \ --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": "Trelis/Llama-2-7b-chat-hf-function-calling", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Trelis/Llama-2-7b-chat-hf-function-calling with Docker Model Runner:
docker model run hf.co/Trelis/Llama-2-7b-chat-hf-function-calling
Commit History
-
v2 is live
57a6493
-
add raw llama-7B model
9c75415 -
Upload LlamaForCausalLM
d085345
-
add GPTQ-trained
5cff35b
-
turning inference off as the model is too large (>10 GB)
dce14eb -
try turning on hosted inference
probably won't work as HF isn't supporting Llama 2 models or I need to understand what to tweakf6e2b95 -
Add 13B GPTQ link
974168a
-
add improved inference options
9f9b784
-
add gptq
55cded1 -
add - ggml tag
8dcc948
-
add GGML for fLlama 7B
ddc5b83 -
make 7B model license Llama 2.
6a55a1a -
Upload LlamaForCausalLM
d3c2efd
-
move up inference guide
7de10d4
-
Update README.md
11421e6 -
Upload LlamaForCausalLM
2548ebd -
Delete pytorch_model-00007-of-00007.bin
e9904c9 -
Delete pytorch_model-00006-of-00007.bin
23ab5be -
Delete pytorch_model-00005-of-00007.bin
f1c0576 -
Delete pytorch_model-00004-of-00007.bin
99f1cf5 -
Delete pytorch_model-00003-of-00007.bin
05020c4 -
Delete pytorch_model-00002-of-00007.bin
a123463 -
Delete pytorch_model-00001-of-00007.bin
0c5d6fb
-
Upload LlamaForCausalLM
cf8b568 -
update dataset info
72afc07
-
Update README.md
5046bda -
Upload LlamaForCausalLM
a5bcadc -
Update README.md
ad85601 -
Delete pytorch_model-00002-of-00002.bin
b15deaa -
Delete pytorch_model-00001-of-00002.bin
7ad5d2e -
Update README.md
cef06c2 -
Update README.md
213ec81
-
Upload LlamaForCausalLM
72a17ab -
Upload tokenizer
ea90915 -
Upload LlamaForCausalLM
629bcbf -
remove space between <s> and [INST]
17fe3c5 -
Update README.md
896638c -
update license now that model has been updated
2883f51 -
Upload tokenizer
b48eff1 -
Upload LlamaForCausalLM
10d6390
-
Update README.md
f7d3ad7 -
add instructions on function calling
ff4b3f0 -
Upload tokenizer
fe720df -
Upload tokenizer
c74762c -
Upload LlamaForCausalLM
95d1fbe -
initial commit
317a4be