Downloads · 30 days
4
17% of all-time downloads
hanseokOh/smartPatent-mContriever-lora
smartPatent-mContriever-lora is a machine learning model from hanseokOh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
The model is fine-tuned on the customed Korean Patent Retrieval system.
Downloads · 30 days
4
17% of all-time downloads
All-time downloads
23
Public
Repo size
1.8 MB
Likes
0
Public
Click a slice to open those files.
.json2.9 MB · 51%
From the Hugging Face model README
The model is fine-tuned on the customed Korean Patent Retrieval system.
Two types of datasets are used as training data: queries automatically generated through GPT-4 and patent titles that are linked to existing patent abstracts.
from transformers import AutoTokenizer, AutoModel, AutoModelForSequenceClassification
import torch
from transformers import AutoModel, AutoTokenizer
from peft import PeftModel, PeftConfig
def get_model(peft_model_name):
config = PeftConfig.from_pretrained(peft_model_name)
base_model = AutoModel.from_pretrained(config.base_model_name_or_path)
model = PeftModel.from_pretrained(base_model, peft_model_name)
model = model.merge_and_unload()
model.eval()
return model
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained('facebook/mcontriever-msmarco')
model = get_model('hanseokOh/smartPatent-mContriever-lora')