Text Generation
Transformers
PyTorch
Safetensors
English
llama
hkust-gz
llama-2
traffic signal control
lightgpt
llmlight
text-generation-inference
Instructions to use usail-hkust/LLMLight-LightGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use usail-hkust/LLMLight-LightGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="usail-hkust/LLMLight-LightGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("usail-hkust/LLMLight-LightGPT") model = AutoModelForCausalLM.from_pretrained("usail-hkust/LLMLight-LightGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use usail-hkust/LLMLight-LightGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "usail-hkust/LLMLight-LightGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "usail-hkust/LLMLight-LightGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/usail-hkust/LLMLight-LightGPT
- SGLang
How to use usail-hkust/LLMLight-LightGPT 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 "usail-hkust/LLMLight-LightGPT" \ --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": "usail-hkust/LLMLight-LightGPT", "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 "usail-hkust/LLMLight-LightGPT" \ --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": "usail-hkust/LLMLight-LightGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use usail-hkust/LLMLight-LightGPT with Docker Model Runner:
docker model run hf.co/usail-hkust/LLMLight-LightGPT
Commit History
-
Update README.md
USAILVerified signature56f2a26 -
Update README.md
USAILVerified signaturea1d7712
-
Update README.md
USAILVerified signaturede13249 -
Update README.md
Verified signature91ee95f -
Update README.md
Verified signature263c0c1 -
Update README.md
Verified signaturee9a8b82 -
Update README.md
Verified signaturea313513 -
Update README.md
Verified signature9f3b593 -
Update README.md
Verified signature9247693 -
Update README.md
Verified signatured9059a8 -
Update README.md
Verified signature40ae2c3 -
Upload Model
Verified signature31a72d1
-
upload model
0e900e1 -
Create README.md
Verified signature81e6fb1 -
initial commit
Verified signaturecf55ef9