Instructions to use ccdv/lsg-base-4096 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccdv/lsg-base-4096 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ccdv/lsg-base-4096", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-base-4096", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("ccdv/lsg-base-4096", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix for transformers >= 4.35.2
Browse files- README.md +1 -1
- modeling_lsg_roberta.py +1 -1
README.md
CHANGED
|
@@ -5,7 +5,7 @@ tags:
|
|
| 5 |
---
|
| 6 |
|
| 7 |
# LSG model
|
| 8 |
-
**Transformers >= 4.
|
| 9 |
**This model relies on a custom modeling file, you need to add trust_remote_code=True**\
|
| 10 |
**See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
|
| 11 |
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
# LSG model
|
| 8 |
+
**Transformers >= 4.35.2**\
|
| 9 |
**This model relies on a custom modeling file, you need to add trust_remote_code=True**\
|
| 10 |
**See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
|
| 11 |
|
modeling_lsg_roberta.py
CHANGED
|
@@ -1190,4 +1190,4 @@ try:
|
|
| 1190 |
str_to_class(value.split(".")[-1]).register_for_auto_class(key)
|
| 1191 |
except:
|
| 1192 |
warn("AutoRegister isn't available, you'll have to manually copy modeling.py after .save_pretrained(...).")
|
| 1193 |
-
warn("Update to transformers >= 4.
|
|
|
|
| 1190 |
str_to_class(value.split(".")[-1]).register_for_auto_class(key)
|
| 1191 |
except:
|
| 1192 |
warn("AutoRegister isn't available, you'll have to manually copy modeling.py after .save_pretrained(...).")
|
| 1193 |
+
warn("Update to transformers >= 4.35.2 to fix.")
|