Instructions to use LR-AI-Labs/tiny-universal-NER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LR-AI-Labs/tiny-universal-NER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LR-AI-Labs/tiny-universal-NER")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LR-AI-Labs/tiny-universal-NER") model = AutoModelForCausalLM.from_pretrained("LR-AI-Labs/tiny-universal-NER", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LR-AI-Labs/tiny-universal-NER with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LR-AI-Labs/tiny-universal-NER" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LR-AI-Labs/tiny-universal-NER", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LR-AI-Labs/tiny-universal-NER
- SGLang
How to use LR-AI-Labs/tiny-universal-NER 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 "LR-AI-Labs/tiny-universal-NER" \ --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": "LR-AI-Labs/tiny-universal-NER", "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 "LR-AI-Labs/tiny-universal-NER" \ --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": "LR-AI-Labs/tiny-universal-NER", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LR-AI-Labs/tiny-universal-NER with Docker Model Runner:
docker model run hf.co/LR-AI-Labs/tiny-universal-NER
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,6 +16,7 @@ It is trained on ChatGPT-generated [Pile-NER-type data](https://huggingface.co/d
|
|
| 16 |
|
| 17 |
Check our [paper](https://arxiv.org/abs/2308.03279) for more information.
|
| 18 |
|
|
|
|
| 19 |
### How to use
|
| 20 |
You will need the transformers>=4.34
|
| 21 |
Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
|
|
@@ -64,5 +65,6 @@ print(outputs[0]["generated_text"])
|
|
| 64 |
### Note: Inferences are based on one entity type at a time. For multiple entity types, create separate instances for each type.
|
| 65 |
|
| 66 |
## License
|
|
|
|
| 67 |
|
| 68 |
This model and its associated data are released under the [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) license. They are primarily used for research purposes.
|
|
|
|
| 16 |
|
| 17 |
Check our [paper](https://arxiv.org/abs/2308.03279) for more information.
|
| 18 |
|
| 19 |
+
|
| 20 |
### How to use
|
| 21 |
You will need the transformers>=4.34
|
| 22 |
Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
|
|
|
|
| 65 |
### Note: Inferences are based on one entity type at a time. For multiple entity types, create separate instances for each type.
|
| 66 |
|
| 67 |
## License
|
| 68 |
+
```
|
| 69 |
|
| 70 |
This model and its associated data are released under the [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) license. They are primarily used for research purposes.
|