Instructions to use csdc-atl/buffer-cross-001 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use csdc-atl/buffer-cross-001 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="csdc-atl/buffer-cross-001", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("csdc-atl/buffer-cross-001", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="csdc-atl/buffer-cross-001", trust_remote_code=True)# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("csdc-atl/buffer-cross-001", trust_remote_code=True, dtype="auto")Quick Links
buffer-cross-001是一个交互式文本相关度预测模型。
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("csdc-atl/buffer-cross-001")
model = AutoModel.from_pretrained("csdc-atl/buffer-cross-001", trust_remote_code=True).cuda()
query = '这是查询'
doc = '这是参考文档'
inputs = cross_tokenizer.encode(
text = query, text_pair=doc,
add_special_tokens=True,
max_length=2048,
return_tensors='pt'
).cuda()
with torch.no_grad():
output = cross_model(input_ids=inputs)
- Downloads last month
- -
# Gated model: Login with a HF token with gated access permission hf auth login