Text Generation
Transformers
Safetensors
code
llama
Generated from Trainer
coding
llama-2
text-generation-inference
Instructions to use edumunozsala/unsloth-llama-2-7B-python-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use edumunozsala/unsloth-llama-2-7B-python-coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="edumunozsala/unsloth-llama-2-7B-python-coder")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("edumunozsala/unsloth-llama-2-7B-python-coder") model = AutoModelForCausalLM.from_pretrained("edumunozsala/unsloth-llama-2-7B-python-coder") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use edumunozsala/unsloth-llama-2-7B-python-coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "edumunozsala/unsloth-llama-2-7B-python-coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "edumunozsala/unsloth-llama-2-7B-python-coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/edumunozsala/unsloth-llama-2-7B-python-coder
- SGLang
How to use edumunozsala/unsloth-llama-2-7B-python-coder 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 "edumunozsala/unsloth-llama-2-7B-python-coder" \ --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": "edumunozsala/unsloth-llama-2-7B-python-coder", "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 "edumunozsala/unsloth-llama-2-7B-python-coder" \ --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": "edumunozsala/unsloth-llama-2-7B-python-coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use edumunozsala/unsloth-llama-2-7B-python-coder with Docker Model Runner:
docker model run hf.co/edumunozsala/unsloth-llama-2-7B-python-coder
Commit ·
b60022e
1
Parent(s): 64f7a0f
Upload LlamaForCausalLM
Browse files
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4840396416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b59d4e90d0a4b0c12c9a4d946626fdb4d03bf766c620adedcc909c62e381ce60
|
| 3 |
size 4840396416
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4857206856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78090ffbde9f5dce00f35c78683f34a43fe830b62f16b6df4fd4fc0c8a15eeea
|
| 3 |
size 4857206856
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4857206904
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bbe34982b5ba76e24cc80b113afc954645278da5fe82fca064817193f9841e6
|
| 3 |
size 4857206904
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4857206904
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7aaab6f71a6b1029b612e19a38770e3d9f76a872d383f733215a8a3bb12fbab
|
| 3 |
size 4857206904
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4857206904
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d702c2cec1522f02b3647b5e3409092db067bc9a30a2839bec492148cdecbbc
|
| 3 |
size 4857206904
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2684472112
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f99a756ac17b08db61cbc0f0134f8efbd85af74b8e6141e480a8a015973ef74b
|
| 3 |
size 2684472112
|