Text Classification
Transformers
Safetensors
English
lfm3_vl
feature-extraction
lfm3
decision
decision-model
classification
calibration
system-one
security
agent-guard
guardrails
custom_code
Instructions to use aidendle94/Scantron-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aidendle94/Scantron-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="aidendle94/Scantron-Preview", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("aidendle94/Scantron-Preview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download native_lfm3.py from aidendle94/Scantron-Preview: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/aidendle94/Scantron-Preview/resolve/main/native_lfm3.py
- Command line
-
hf download hf://aidendle94/Scantron-Preview/native_lfm3.py
-
curl -L -o native_lfm3.py https://huggingface.co/aidendle94/Scantron-Preview/resolve/main/native_lfm3.py
1.27 kB
| """LFM3's transformers classes, one module a model type: `native_lfm3` (text), `native_lfm3_vl` (pictures), | |
| `native_lfm3_omni` (pictures and audio), each importing the one before it, so a Hub repository serves only its | |
| model's files. transformers' own classes once a release ships them; until then copies of transformers' LFM3 code | |
| beside these (each names its commit), registered with the Auto classes, so a checkpoint's config, tokenizer and | |
| processor load and the composite models build their parts. | |
| Shipping LFM3, transformers makes the fallbacks dead: delete them and the copies (the files headed "Vendored from"), | |
| nothing else.""" | |
| from __future__ import annotations | |
| try: | |
| from transformers import Lfm3Config, Lfm3ForCausalLM, Lfm3Model | |
| except ImportError: | |
| from transformers import AutoConfig, AutoModel | |
| from .configuration_lfm3 import Lfm3Config | |
| from .modeling_lfm3 import Lfm3ForCausalLM, Lfm3Model | |
| # exist_ok: a second copy of these files in one process (two snapshots) registers again | |
| AutoConfig.register(Lfm3Config.model_type, Lfm3Config, exist_ok=True) | |
| AutoModel.register(Lfm3Config, Lfm3Model, exist_ok=True) # the composite models build their text model by config | |
| __all__ = ["Lfm3Config", "Lfm3ForCausalLM", "Lfm3Model"] | |