Views
No views yet
transformers and peft libraries as follows:1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4# Load the base model and tokenizer
5model = AutoModelForCausalLM.from_pretrained("kittn/mistral-7B-v0.1-hf")
6tokenizer = AutoTokenizer.from_pretrained("kittn/mistral-7B-v0.1-hf")
7
8# Load LoRA weights for toponym resolution
9model = PeftModel.from_pretrained(model, "your-username/Mistral-7B-LoRA-Toponym-Resolution")1@article{hu2024toponym,
2 title={Toponym resolution leveraging lightweight and open-source large language models and geo-knowledge},
3 author={Hu, Xuke and Kersten, Jens and Klan, Friederike and Farzana, Sheikh Mastura},
4 journal={International Journal of Geographical Information Science},
5 pages={1--28},
6 year={2024},
7 publisher={Taylor & Francis}
8}