Instructions to use dfurman/LLaMA-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dfurman/LLaMA-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dfurman/LLaMA-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dfurman/LLaMA-7B") model = AutoModelForCausalLM.from_pretrained("dfurman/LLaMA-7B") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dfurman/LLaMA-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dfurman/LLaMA-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dfurman/LLaMA-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dfurman/LLaMA-7B
- SGLang
How to use dfurman/LLaMA-7B 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 "dfurman/LLaMA-7B" \ --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": "dfurman/LLaMA-7B", "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 "dfurman/LLaMA-7B" \ --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": "dfurman/LLaMA-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dfurman/LLaMA-7B with Docker Model Runner:
docker model run hf.co/dfurman/LLaMA-7B
Upload LlamaForCausalLM
Browse files- config.json +1 -1
- pytorch_model-00001-of-00002.bin +2 -2
- pytorch_model-00002-of-00002.bin +1 -1
config.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
"pad_token_id": 0,
|
| 17 |
"rms_norm_eps": 1e-06,
|
| 18 |
"tie_word_embeddings": false,
|
| 19 |
-
"torch_dtype": "
|
| 20 |
"transformers_version": "4.30.2",
|
| 21 |
"use_cache": true,
|
| 22 |
"vocab_size": 32000
|
|
|
|
| 16 |
"pad_token_id": 0,
|
| 17 |
"rms_norm_eps": 1e-06,
|
| 18 |
"tie_word_embeddings": false,
|
| 19 |
+
"torch_dtype": "bfloat16",
|
| 20 |
"transformers_version": "4.30.2",
|
| 21 |
"use_cache": true,
|
| 22 |
"vocab_size": 32000
|
pytorch_model-00001-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf4943b276b4b1a15817cca729bd713033028c9fb8ae358ad6df8625ac9a4958
|
| 3 |
+
size 9976637950
|
pytorch_model-00002-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3500316627
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8031fcbf46852421e24686c30ab72ec1cb02b9102ac83c79ebbafcee9790776
|
| 3 |
size 3500316627
|