Downloads · 30 days
3
3% of all-time downloads
cyqwill/sger-lfm2.5-name-matching
sger-lfm2.5-name-matching is a machine learning model from cyqwill. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
在 LiquidAI/LFM2.5-350M 基础上分两阶段 LoRA 微调后的合并模型,用于印度 KYC 场景:
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
88
Public
Parameters
354M
709 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors709 MB · 99%
From the Hugging Face model README
在 LiquidAI/LFM2.5-350M 基础上分两阶段 LoRA 微调后的合并模型,用于印度 KYC 场景:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"cyqwill/sger-lfm2.5-name-matching",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("cyqwill/sger-lfm2.5-name-matching")
prompt = (
"<|system|>\n"
"You are an expert system for KYC name matching in India. Determine if Name 1 and Name 2 refer to the same person. "
"Account for spelling variations, abbreviations, token reordering, merged tokens, and honorifics (-bhai, -ji).\n"
"<|user|>\n"
'[Few-Shot Examples]\n'
'Name 1: "kirtan singh" | Name 2: "singhkirtan" -> Yes\n'
'Name 1: "ramesh patel" | Name 2: "rameshbhai patel" -> Yes\n'
'Name 1: "vipin" | Name 2: "bipin" -> No\n'
'[Target]\n'
'Name 1: "अनिल रजनी यादव" | Name 2: "रजनी अनिल यादव" -> Match?\n'
"<|assistant|>\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=8)
print(tokenizer.decode(out[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))
测试集(9581 对姓名):
| 指标 | 数值 |
|---|---|
| Precision | 0.9997 |
| Recall | 0.9997 |
| F1 | 0.9997 |
| Accuracy | 0.9998 |