Instructions to use zjunlp/OneKE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zjunlp/OneKE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zjunlp/OneKE")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zjunlp/OneKE") model = AutoModelForCausalLM.from_pretrained("zjunlp/OneKE") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use zjunlp/OneKE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zjunlp/OneKE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zjunlp/OneKE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zjunlp/OneKE
- SGLang
How to use zjunlp/OneKE 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 "zjunlp/OneKE" \ --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": "zjunlp/OneKE", "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 "zjunlp/OneKE" \ --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": "zjunlp/OneKE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zjunlp/OneKE with Docker Model Runner:
docker model run hf.co/zjunlp/OneKE
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,6 +3,31 @@ license: cc-by-nc-sa-4.0
|
|
| 3 |
---
|
| 4 |
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- [What is OneKE?](#what-is-oneke)
|
| 7 |
- [How is OneKE trained?](#how-is-oneke-trained)
|
| 8 |
- [Getting Started with OneKE](#getting-started-with-oneke)
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
|
| 6 |
+
<p align="center">
|
| 7 |
+
<a href="https://github.com/zjunlp/deepke"> <img src="assets/oneke_logo.png" width="400"/></a>
|
| 8 |
+
<p>
|
| 9 |
+
<p align="center">
|
| 10 |
+
<a href="https://oneke.openkg.cn/">
|
| 11 |
+
<img alt="Documentation" src="https://img.shields.io/badge/demo-website-blue">
|
| 12 |
+
</a>
|
| 13 |
+
<a href="https://pypi.org/project/deepke/#files">
|
| 14 |
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/deepke">
|
| 15 |
+
</a>
|
| 16 |
+
<a href="https://github.com/zjunlp/DeepKE/blob/master/LICENSE">
|
| 17 |
+
<img alt="GitHub" src="https://img.shields.io/github/license/zjunlp/deepke">
|
| 18 |
+
</a>
|
| 19 |
+
<a href="http://zjunlp.github.io/DeepKE">
|
| 20 |
+
<img alt="Documentation" src="https://img.shields.io/badge/doc-website-red">
|
| 21 |
+
</a>
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
<h1 align="center">
|
| 27 |
+
<p>OneKE: A Bilingual Large Language Model for <br>Knowledge Extraction</p>
|
| 28 |
+
</h1>
|
| 29 |
+
|
| 30 |
+
|
| 31 |
- [What is OneKE?](#what-is-oneke)
|
| 32 |
- [How is OneKE trained?](#how-is-oneke-trained)
|
| 33 |
- [Getting Started with OneKE](#getting-started-with-oneke)
|