Instructions to use SparseLLM/prosparse-llama-2-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SparseLLM/prosparse-llama-2-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SparseLLM/prosparse-llama-2-7b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SparseLLM/prosparse-llama-2-7b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SparseLLM/prosparse-llama-2-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SparseLLM/prosparse-llama-2-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SparseLLM/prosparse-llama-2-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SparseLLM/prosparse-llama-2-7b
- SGLang
How to use SparseLLM/prosparse-llama-2-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 "SparseLLM/prosparse-llama-2-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": "SparseLLM/prosparse-llama-2-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 "SparseLLM/prosparse-llama-2-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": "SparseLLM/prosparse-llama-2-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SparseLLM/prosparse-llama-2-7b with Docker Model Runner:
docker model run hf.co/SparseLLM/prosparse-llama-2-7b
Commit History
-
Update README.md
Verified signature5197d09
-
Update README.md
Verified signature4b55046
-
Update README.md
Verified signature178909c
-
Update README.md
Verified signatureb70f0ee
-
Upload README.md with huggingface_hub
Verified signature89852d8
-
Upload README.md with huggingface_hub
Verified signature48ed02e -
Upload README.md with huggingface_hub
Verified signaturecab5d7d -
Upload README.md with huggingface_hub
Verified signature6cc5604 -
Upload README.md with huggingface_hub
Verified signature3935c6b -
Upload README.md with huggingface_hub
Verified signaturee030238
-
Upload README.md with huggingface_hub
Verified signature617b900 -
Upload README.md with huggingface_hub
Verified signature4958483
-
Update README.md
Verified signature2b58114
-
Upload README.md with huggingface_hub
Verified signature48902ce -
Upload README.md with huggingface_hub
Verified signature5964ef6
-
Upload README.md with huggingface_hub
Verified signature751d127 -
Upload README.md with huggingface_hub
Verified signaturee3372c4 -
Upload README.md with huggingface_hub
Verified signature7a7b371 -
Upload README.md with huggingface_hub
Verified signature2b1cda0 -
Upload README.md with huggingface_hub
Verified signature4a1406b -
Upload README.md with huggingface_hub
Verified signaturec94db0e -
Upload folder using huggingface_hub
Verified signatured298f48 -
Upload README.md with huggingface_hub
Verified signature3a99ae4 -
Upload README.md with huggingface_hub
Verified signatureef25da3 -
Upload README.md with huggingface_hub
Verified signature0485383 -
Upload README.md with huggingface_hub
Verified signaturee71389a -
Upload README.md with huggingface_hub
Verified signaturee0434f5 -
Upload README.md with huggingface_hub
Verified signature80c4c87 -
Upload README.md with huggingface_hub
Verified signaturea14d09d -
Upload README.md with huggingface_hub
Verified signatured885f49 -
Upload README.md with huggingface_hub
Verified signaturecc93a41 -
Upload README.md with huggingface_hub
Verified signaturea81bc18 -
Upload README.md with huggingface_hub
Verified signatureac4d8a1 -
initial commit
Verified signature3a5fd5b