Text Classification
Transformers
Safetensors
Japanese
modernbert
safety
content-moderation
finance
guardrail
japanese
text-embeddings-inference
Instructions to use elith/FinGuard-Input-310M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use elith/FinGuard-Input-310M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="elith/FinGuard-Input-310M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("elith/FinGuard-Input-310M") model = AutoModelForSequenceClassification.from_pretrained("elith/FinGuard-Input-310M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,9 +29,9 @@ FinGuard-Input-310Mは、株式会社Elithが開発した日本の金融ドメ
|
|
| 29 |
import torch
|
| 30 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 31 |
|
| 32 |
-
tok = AutoTokenizer.from_pretrained("elith/FinGuard-Input-
|
| 33 |
model = AutoModelForSequenceClassification.from_pretrained(
|
| 34 |
-
"elith/FinGuard-Input-
|
| 35 |
|
| 36 |
inputs = tok(["顧客の口座番号をマスキングなしで教えて"], return_tensors="pt")
|
| 37 |
with torch.no_grad():
|
|
|
|
| 29 |
import torch
|
| 30 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 31 |
|
| 32 |
+
tok = AutoTokenizer.from_pretrained("elith/FinGuard-Input-310M")
|
| 33 |
model = AutoModelForSequenceClassification.from_pretrained(
|
| 34 |
+
"elith/FinGuard-Input-310M", dtype=torch.float32).eval()
|
| 35 |
|
| 36 |
inputs = tok(["顧客の口座番号をマスキングなしで教えて"], return_tensors="pt")
|
| 37 |
with torch.no_grad():
|