Instructions to use elizaveta-dev/mT5-REF-CORRUPT-DE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use elizaveta-dev/mT5-REF-CORRUPT-DE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="elizaveta-dev/mT5-REF-CORRUPT-DE")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("elizaveta-dev/mT5-REF-CORRUPT-DE") model = AutoModelForSeq2SeqLM.from_pretrained("elizaveta-dev/mT5-REF-CORRUPT-DE") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use elizaveta-dev/mT5-REF-CORRUPT-DE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "elizaveta-dev/mT5-REF-CORRUPT-DE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "elizaveta-dev/mT5-REF-CORRUPT-DE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/elizaveta-dev/mT5-REF-CORRUPT-DE
- SGLang
How to use elizaveta-dev/mT5-REF-CORRUPT-DE 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 "elizaveta-dev/mT5-REF-CORRUPT-DE" \ --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": "elizaveta-dev/mT5-REF-CORRUPT-DE", "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 "elizaveta-dev/mT5-REF-CORRUPT-DE" \ --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": "elizaveta-dev/mT5-REF-CORRUPT-DE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use elizaveta-dev/mT5-REF-CORRUPT-DE with Docker Model Runner:
docker model run hf.co/elizaveta-dev/mT5-REF-CORRUPT-DE
T5-REF-CORRUPT-DE: Automatic Error Correction of Academic Referencing According to Institutional Guidelines of the Center for Translation Studies (CTS) of University of Vienna
Objective: This model corrects errors in academic referencing. For example:
Input (wrong sentence): Sowohl Meyer & Thompson (2018) als auch Kunz & Alvarez-Rodriguez (2018) kritisieren den unzureichenden Austausch zwischen WissenschaftlerInnen, EntwicklerInnen und AnwenderInnen.
Output (clean sentence): Sowohl Meyer and Thompson (2018) als auch Kunz and Alvarez-Rodriguez (2018) kritisieren den unzureichenden Austausch zwischen WissenschaftlerInnen, EntwicklerInnen und AnwenderInnen.
Model Details:
- Model name: mT5-REF-CORRUPT-DE
- Base model: mT5-base
- Language: German
- Training data: Synthetically generated using LLMs and synthetically corrupted real student sentences.
Usage Cases: Error correction of academic references according to CTS guidelines.
Example
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "elizaveta-dev/T5-REF-CORRUPT-DE"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "Sowohl Meyer & Thompson (2018) als auch Kunz & Alvarez-Rodriguez (2018) kritisieren den unzureichenden Austausch zwischen WissenschaftlerInnen, EntwicklerInnen und AnwenderInnen."
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Use-Cases
The model can perform automatic corrections of various referencing errors, including:
1. Incorrect Citation Type (Parenthetical vs. Narrative)
Example of mistake: (Lopez 2018; Chen 2012) fanden heraus, dass der kulturelle Kontext Übersetzungsstrategien stark beeinflusst.
Example of correction: Lopez (2018) und Chen (2012) fanden heraus, dass der kulturelle Kontext Übersetzungsstrategien stark beeinflusst.
Example of mistake: Dieses Thema wurde umfassend erforscht Baker (2006).
Example of correction: Dieses Thema wurde umfassend erforscht (Baker 2006).
2. Incorrect Citation for Two Authors
Example of mistake: Das Konzept der funktionalen Äquivalenz wurde von Baker & Green (2007) analysiert.
Example of correction: Das Konzept der funktionalen Äquivalenz wurde von Baker und Green (2007) analysiert.
3. Incorrect Placement of Citations
Example of mistake: Williams zufolge entwickelt sich die Übersetzungstheorie kontinuierlich weiter (2011: 77).
Example of correction: Williams (2011: 77) zufolge entwickelt sich die Übersetzungstheorie kontinuierlich weiter.
- Downloads last month
- 1