Run this model with HF Jobs
Run Cainiao-AI/G2PTL on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Cainiao-AI/G2PTL. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Cainiao-AI/G2PTL on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Cainiao-AI/G2PTL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cainiao-AI/G2PTL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Cainiao-AI/G2PTL", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Cainiao-AI/G2PTL", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
G2PTL update
Browse filesFiles changed (3)
- README.md+5-1
- htc_loss.py+1-1
- modeling_G2PTL.py+1-1
27 unmodified lines2829303132332 unmodified lines363738394041424344454627 unmodified lines## Intended uses & limitationsThis model is designed for decision tasks based on address text, including tasks related to understanding address texts and Spatial-Temporal downstream tasks which rely on address text representation.1. Address text understanding tasks2 unmodified lines- Geographic Entity Alignment- Address Text Similarity- Address Texy Classification2. Spatial-Temporal downstream tasks:- Estimated Time of Arrival (ETA) Prediction- Pick-up & Delivery Route Prediction.The model currently only supports Chinese addresses.## How to use27 unmodified lines282930313233342 unmodified lines373839404142434445464748495027 unmodified lines## Intended uses & limitationsThis model is designed for decision tasks based on address text, including tasks related to understanding address texts and Spatial-Temporal downstream tasks which rely on address text representation.1. Address text understanding tasks2 unmodified lines- Geographic Entity Alignment- Address Text Similarity- Address Texy Classification- ...2. Spatial-Temporal downstream tasks:- Estimated Time of Arrival (ETA) Prediction- Pick-up & Delivery Route Prediction.- Express Volume Prediction- ...The model currently only supports Chinese addresses, and it is an encoder-only model which is not suitable for text generation scenarios such as question answering. If you need to use address text based dialogue capabilities, you can look forward to our second version of G2PTL (v2.0)## How to use
10 unmodified lines1112131415161710 unmodified linesfrom transformers.utils.hub import cached_fileresolved_module_file = cached_file('JunhongLou/G2PTL','htc_mask_dict.pkl',)10 unmodified lines1112131415161710 unmodified linesfrom transformers.utils.hub import cached_fileresolved_module_file = cached_file('Cainiao-AI/G2PTL','htc_mask_dict.pkl',)
19 unmodified lines2021222324252619 unmodified linesfrom .htc_loss import HTCLossfrom transformers.utils.hub import cached_fileremap_code_2_chn_file_path = cached_file('JunhongLou/G2PTL','remap_code_2_chn.pkl',)19 unmodified lines2021222324252619 unmodified linesfrom .htc_loss import HTCLossfrom transformers.utils.hub import cached_fileremap_code_2_chn_file_path = cached_file('Cainiao-AI/G2PTL','remap_code_2_chn.pkl',)
README.md+5-1
htc_loss.py+1-1
modeling_G2PTL.py+1-1