Downloads · 30 days
15
3% of all-time downloads
WENGSYX/MedCPT
MedCPT is a feature extraction model from WENGSYX. Use it when you need embeddings to search or compare text. It is set up for transformers.
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
501
Public
Repo size
3.1 GB
Likes
0
Public
Click a slice to open those files.
.bin1.6 GB · 100%
From the Hugging Face model README
>>> from modeling_cpt import CPTForConditionalGeneration
>>> from transformers import BertTokenizer
>>> tokenizer = BertTokenizer.from_pretrained("WENGSYX/MedCPT")
>>> model = CPTForConditionalGeneration.from_pretrained("WENGSYX/MedCPT")
>>> inputs = tokenizer.encode("医生你好,腹泻难受应该怎么办?", return_tensors='pt')
>>> pred_ids = model.generate(input_ids, num_beams=4, max_length=20)
>>> print(tokenizer.convert_ids_to_tokens(pred_ids[i]))