Instructions to use highdeff/highdeff1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use highdeff/highdeff1 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("highdeff/highdeff1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| import re | |
| def custom_tokenizer(text): | |
| # Lowercase the text | |
| text = text.lower() | |
| # Remove punctuation | |
| text = re.sub(r'[^\w\s]', '', text) | |
| # Split the text into tokens | |
| tokens = text.split() | |
| # Add special tokens for the question | |
| tokens.insert(0, '<question>') | |
| tokens.append('<endquestion>') | |
| return tokens | |