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
Update README.md
Browse files
README.md
CHANGED
|
@@ -20,10 +20,10 @@ Please download the model and run the LLMLight framework by following the descri
|
|
| 20 |
|
| 21 |
<a id="framework"></a>
|
| 22 |
|
| 23 |
-
## 2 Framework
|
| 24 |

|
| 25 |
|
| 26 |
<a id="demo"></a>
|
| 27 |
|
| 28 |
-
## 3 Demo
|
| 29 |
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64207ca7e40f66bcd1e44959/VhMOdEIjKeLml1WPcINqV.qt"></video>
|
|
|
|
| 20 |
|
| 21 |
<a id="framework"></a>
|
| 22 |
|
| 23 |
+
## 2 Framework
|
| 24 |

|
| 25 |
|
| 26 |
<a id="demo"></a>
|
| 27 |
|
| 28 |
+
## 3 Demo
|
| 29 |
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64207ca7e40f66bcd1e44959/VhMOdEIjKeLml1WPcINqV.qt"></video>
|