Text Generation
Transformers
PyTorch
Chinese
gpt2
Court View
Legal Judgment Prediction
Explainable
GPT2
text-generation-inference
Instructions to use openkg/aijudge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openkg/aijudge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openkg/aijudge")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openkg/aijudge") model = AutoModelForCausalLM.from_pretrained("openkg/aijudge", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openkg/aijudge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openkg/aijudge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openkg/aijudge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openkg/aijudge
- SGLang
How to use openkg/aijudge 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 "openkg/aijudge" \ --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": "openkg/aijudge", "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 "openkg/aijudge" \ --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": "openkg/aijudge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openkg/aijudge with Docker Model Runner:
docker model run hf.co/openkg/aijudge
Update README.md
Browse files
README.md
CHANGED
|
@@ -55,3 +55,7 @@ Despite being significantly ameliorated through professional annotation and eval
|
|
| 55 |
|
| 56 |
## Disclaimer
|
| 57 |
<p align = "justify">This project is strictly for academic research purposes and is prohibited for commercial use. When utilizing third-party technologies, adhere to the corresponding open-source licenses. The accuracy of the content generated by this project is subject to factors such as algorithms, randomness, and quantification precision, and therefore, cannot be guaranteed. The project assumes no legal liability for any content produced by the model and shall not be held responsible for any damages resulting from the use of related resources and output. Due to the time constraints of the R&D group, timely technical support is unfortunately not feasible.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
## Disclaimer
|
| 57 |
<p align = "justify">This project is strictly for academic research purposes and is prohibited for commercial use. When utilizing third-party technologies, adhere to the corresponding open-source licenses. The accuracy of the content generated by this project is subject to factors such as algorithms, randomness, and quantification precision, and therefore, cannot be guaranteed. The project assumes no legal liability for any content produced by the model and shall not be held responsible for any damages resulting from the use of related resources and output. Due to the time constraints of the R&D group, timely technical support is unfortunately not feasible.</p>
|
| 58 |
+
|
| 59 |
+
## Contributors
|
| 60 |
+
|
| 61 |
+
Sheng Bi, Haofen Wang, Tianxing Wu, Guilin Qi
|