Instructions to use VerbACxSS/sempl-it-sentence-reorganizer-bnb with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VerbACxSS/sempl-it-sentence-reorganizer-bnb with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VerbACxSS/sempl-it-sentence-reorganizer-bnb") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("VerbACxSS/sempl-it-sentence-reorganizer-bnb", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VerbACxSS/sempl-it-sentence-reorganizer-bnb with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VerbACxSS/sempl-it-sentence-reorganizer-bnb" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VerbACxSS/sempl-it-sentence-reorganizer-bnb", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VerbACxSS/sempl-it-sentence-reorganizer-bnb
- SGLang
How to use VerbACxSS/sempl-it-sentence-reorganizer-bnb 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 "VerbACxSS/sempl-it-sentence-reorganizer-bnb" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VerbACxSS/sempl-it-sentence-reorganizer-bnb", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "VerbACxSS/sempl-it-sentence-reorganizer-bnb" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VerbACxSS/sempl-it-sentence-reorganizer-bnb", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VerbACxSS/sempl-it-sentence-reorganizer-bnb with Docker Model Runner:
docker model run hf.co/VerbACxSS/sempl-it-sentence-reorganizer-bnb
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,27 @@ library_name: transformers
|
|
| 9 |
tags:
|
| 10 |
- legal
|
| 11 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
## Usage
|
| 13 |
Install the following dependencies:
|
| 14 |
```sh
|
|
@@ -57,8 +78,8 @@ Load SEMPL-IT model and tokenizer:
|
|
| 57 |
```py
|
| 58 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 59 |
|
| 60 |
-
tokenizer = AutoTokenizer.from_pretrained("VerbACxSS/sempl-it-sentence-reorganizer-
|
| 61 |
-
model = AutoModelForCausalLM.from_pretrained("VerbACxSS/sempl-it-sentence-reorganizer-
|
| 62 |
```
|
| 63 |
|
| 64 |
Define and apply chat template:
|
|
|
|
| 9 |
tags:
|
| 10 |
- legal
|
| 11 |
---
|
| 12 |
+
# sempl-it-sentence-reorganizer-bnb
|
| 13 |
+
SEMPL-IT aims to simplify Italian administrative texts using a progressive approach based on multiple specialized models.
|
| 14 |
+
Each model addresses a specific aspect of the text transformation process, ensuring a step-by-step refinement.
|
| 15 |
+
|
| 16 |
+
## Simplification Pipeline
|
| 17 |
+
The complete text simplification pipeline follows eight sequential steps:
|
| 18 |
+
1. [proofreading](https://huggingface.co/VerbACxSS/sempl-it-proofreading-bnb)
|
| 19 |
+
2. [lex](https://huggingface.co/VerbACxSS/sempl-it-lex-bnb)
|
| 20 |
+
3. [connectives](https://huggingface.co/VerbACxSS/sempl-it-connectives-bnb)
|
| 21 |
+
4. [expressions](https://huggingface.co/VerbACxSS/sempl-it-expressions-bnb)
|
| 22 |
+
5. [sentence-splitter](https://huggingface.co/VerbACxSS/sempl-it-sentence-splitter-bnb)
|
| 23 |
+
6. [nominalizations](https://huggingface.co/VerbACxSS/sempl-it-nominalizations-bnb)
|
| 24 |
+
7. [verbs](https://huggingface.co/VerbACxSS/sempl-it-verbs-bnb)
|
| 25 |
+
8. [sentence-reorganizer](https://huggingface.co/VerbACxSS/sempl-it-sentence-reorganizer-bnb) (this)
|
| 26 |
+
|
| 27 |
+
## Web App
|
| 28 |
+
To integrate this model into the full system, check out:
|
| 29 |
+
- Frontend: [GitHub Repository](https://github.com/VerbACxSS/sempl-it-frontend)
|
| 30 |
+
- Backend: [GitHub Repository](https://github.com/VerbACxSS/sempl-it-backend)
|
| 31 |
+
- Inference: [GitHub Repository](https://github.com/VerbACxSS/sempl-it-inference)
|
| 32 |
+
|
| 33 |
## Usage
|
| 34 |
Install the following dependencies:
|
| 35 |
```sh
|
|
|
|
| 78 |
```py
|
| 79 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 80 |
|
| 81 |
+
tokenizer = AutoTokenizer.from_pretrained("VerbACxSS/sempl-it-sentence-reorganizer-bnb")
|
| 82 |
+
model = AutoModelForCausalLM.from_pretrained("VerbACxSS/sempl-it-sentence-reorganizer-bnb").to("cuda")
|
| 83 |
```
|
| 84 |
|
| 85 |
Define and apply chat template:
|