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
| import time | |
| from datetime import timedelta | |
| import pandas as pd | |
| from loguru import logger | |
| def print_execution_time(func): | |
| def wrapper_time(*args, **kwargs): | |
| start = time.perf_counter() | |
| a = func(*args, **kwargs) | |
| end = time.perf_counter() | |
| logger.debug(f"{func.__name__}: {str(timedelta(seconds=end - start))}") | |
| return a | |
| return wrapper_time | |