Instructions to use sanjin7/ctr-ll4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sanjin7/ctr-ll4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sanjin7/ctr-ll4", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("sanjin7/ctr-ll4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 400 Bytes
cea4a4b | 1 2 3 4 5 6 7 8 9 10 | def get_new_model_name(model_checkpoint: str, model_name: str = None) -> str:
if model_name is None:
old_version_number = int(model_checkpoint[-2:])
new_version_number = str(old_version_number + 1).zfill(2)
model_name = f"{model_checkpoint[:-2]}{new_version_number}"
elif not model_name[-2:].isnumeric():
model_name = model_name + "_00"
return model_name
|