Instructions to use daelba/vital2wikibase with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use daelba/vital2wikibase with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="daelba/vital2wikibase")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("daelba/vital2wikibase") model = AutoModelForSeq2SeqLM.from_pretrained("daelba/vital2wikibase") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use daelba/vital2wikibase with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "daelba/vital2wikibase" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "daelba/vital2wikibase", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/daelba/vital2wikibase
- SGLang
How to use daelba/vital2wikibase 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 "daelba/vital2wikibase" \ --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": "daelba/vital2wikibase", "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 "daelba/vital2wikibase" \ --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": "daelba/vital2wikibase", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use daelba/vital2wikibase with Docker Model Runner:
docker model run hf.co/daelba/vital2wikibase
YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
A model for converting vital records to Wikibase. Trained on a transcription dataset extracted with HTR (eScriptorium) from 150 pages of the Jewish register book HBMa 2501 (Wikidata). The dataset contains 1071 vital records, which were uploaded to Wikibase Cloud after processing with this model.
Based on Google's mT5.
Processing ditto marks
mt5prefix = "dto"
upperCell = "18 Juny 1858 H. Barb. Kohn"
lowerCell = "dto dto H. Ros. Plowitz"
dataset_input = f"{mt5prefix}:{upperCell}|{lowerCell}"
dataset_target = "18 Juny 1858 H. Ros. Plowitz"
Processing a table cell
mt5prefix = "wbPre"
header = "Namen des Vaters mit Anführung des Standes, ob Familiant od. Gewerbsmann, u. seines Wohnortes, Schutzdom. Haus-Nr. und bei ehelichen Geburten seines Gubernial-Ehekonsenses Datum und Zahl"
cell = "Markus Gibianer, Lederhändler, S. d. Seligmann Gibianer u. der Magdalena geb. Motz"
dataset_input = f"{mt5prefix}:{header}|{cell}"
dataset_target = "[[P23:Markus Gibianer|P26:Lederhändler]] [[P27:Seligmann Gibianer]] [[P28:Magdalena Gibianer geb. Motz]]"
Processing a whole record
See the entry on Wikibase Cloud.
mt5prefix = "wbDef" input_string = "[[P5:60]] [[P6:1865-05-05]] [[P7:H. Charlotte Löw]] [[P12|DD:23]] [[P12|MM:04]] [[P12|YY:1865]] [[P14|P8:1061/2]] [[P14:Q8]] [[P15|DD:06]] [[P15|MM:05]] [[P15|YY:1865]] [[P16:Q22]] [[P17:Friederika]] [[P20:4]] [[P21:Q13]] [[P22:Q15]] [[P23:Jakob Raubitschek|P26:Eisenhändler]] [[P27:Josef Raubitschek]] [[P28:Theresia Raubitschek geb. Latus]] [[P24:Pauline XXX]] [[P29:Markus Raudnitz]] [[P30:Rachel Raudnitz geb. Kuh]]" dataset_input = f"{mt5prefix}:{input_string}" dataset_target = "[[P12:1865-04-23]] [[P14:Q8|P8:1061/2]] [[P15:1865-05-06]] [[P16:Q22]] [[P17:Friederika]] [[P18:Raubitschek]] [[P19:Friederika Raubitschek]] [[P1:Q1]] [[P20:4]] [[P21:Q13]] [[P22:Q15]] [[P23:Jakob Raubitschek|P26:Eisenhändler]] [[P24:Pauline Raubitschek]] [[P27:Josef Raubitschek]] [[P28:Theresia Raubitschek geb. Latus]] [[P29:Markus Raudnitz]] [[P30:Rachel Raudnitz geb. Kuh]] [[P33:Charlotte Löw]] [[P38:Q170]] [[P5:60]] [[P6:1865-05-05]] [[P7:H. Charlotte Löw]]"
- Downloads last month
- 2
Model tree for daelba/vital2wikibase
Base model
google/mt5-small