Instructions to use tim1900/bert-chunker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tim1900/bert-chunker with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="tim1900/bert-chunker")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("tim1900/bert-chunker") model = AutoModel.from_pretrained("tim1900/bert-chunker", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -39,7 +39,7 @@ config = AutoConfig.from_pretrained(
|
|
| 39 |
|
| 40 |
# initialize model
|
| 41 |
model = BertChunker(config)
|
| 42 |
-
device='
|
| 43 |
model.to(device)
|
| 44 |
|
| 45 |
# load parameters, tim1900/BertChunker/model.safetensors
|
|
|
|
| 39 |
|
| 40 |
# initialize model
|
| 41 |
model = BertChunker(config)
|
| 42 |
+
device='cpu' # or 'cuda'
|
| 43 |
model.to(device)
|
| 44 |
|
| 45 |
# load parameters, tim1900/BertChunker/model.safetensors
|