Instructions to use Analyze/llama2nlbash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Analyze/llama2nlbash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Analyze/llama2nlbash")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Analyze/llama2nlbash") model = AutoModelForCausalLM.from_pretrained("Analyze/llama2nlbash") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Analyze/llama2nlbash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Analyze/llama2nlbash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Analyze/llama2nlbash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Analyze/llama2nlbash
- SGLang
How to use Analyze/llama2nlbash 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 "Analyze/llama2nlbash" \ --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": "Analyze/llama2nlbash", "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 "Analyze/llama2nlbash" \ --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": "Analyze/llama2nlbash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Analyze/llama2nlbash with Docker Model Runner:
docker model run hf.co/Analyze/llama2nlbash
Upload LlamaForCausalLM
Browse files
pytorch_model-00001-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1981890946
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f2b2d370632d67c69edf29fc622a0813f6c8a04d2cf9dc61491a64457737ab4a
|
| 3 |
size 1981890946
|
pytorch_model-00002-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1990297948
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d75e74081b02a68f4cf85ceb72bb7fbf9d5be70bd43fcc2f63d4d71f26ee41e1
|
| 3 |
size 1990297948
|
pytorch_model-00003-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1990298012
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c3fd7fe22ddf3731007c2afc2291a94f64fe312d6e85d10b0d6eb6363df8539
|
| 3 |
size 1990298012
|
pytorch_model-00004-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1990298012
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:848030471b25a5403df75f8666d9e9539540b9093298c65583000c9e298f4b94
|
| 3 |
size 1990298012
|
pytorch_model-00005-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1933657848
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ffcf514f1cee50278f1acd3fa6851928576206cfce4a1295dbd3805591eeae12
|
| 3 |
size 1933657848
|
pytorch_model-00006-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1933674908
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c098cdba7b0c694d4ff66b2155d1319c40ab72e7edde253a293002571e44fab3
|
| 3 |
size 1933674908
|
pytorch_model-00007-of-00007.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1656837554
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56d9fc28a05098d5b755b5ca5c2171aef6948fd1928085a848ea96d684813018
|
| 3 |
size 1656837554
|