Instructions to use Synthyra/Profluent-E1-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Synthyra/Profluent-E1-150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Synthyra/Profluent-E1-150M", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("Synthyra/Profluent-E1-150M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,857 Bytes
b593054 443b6bc b593054 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | """FastPLMs public package interface.
The module uses lazy exports so importing :mod:`fastplms` does not initialize
Torch, download checkpoints, construct tokenizers, or compile kernels.
"""
from __future__ import annotations
from importlib import import_module
from typing import Any
__version__ = "1.0.0"
_LAZY_EXPORTS = {
"CheckpointSource": ("fastplms.registry", "CheckpointSource"),
"EmbeddingInput": ("fastplms.embeddings", "EmbeddingInput"),
"EmbeddingRecord": ("fastplms.embeddings", "EmbeddingRecord"),
"EmbeddingResult": ("fastplms.embeddings", "EmbeddingResult"),
"FileDigest": ("fastplms.registry", "FileDigest"),
"ModelFamily": ("fastplms.registry", "ModelFamily"),
"ModelRegistry": ("fastplms.registry", "ModelRegistry"),
"ModelSpec": ("fastplms.registry", "ModelSpec"),
"OracleAsset": ("fastplms.registry", "OracleAsset"),
"RegistryError": ("fastplms.registry", "RegistryError"),
"RuntimeProfile": ("fastplms.runtime", "RuntimeProfile"),
"UpstreamSource": ("fastplms.registry", "UpstreamSource"),
"embed_dataset": ("fastplms.embeddings", "embed_dataset"),
"get_model_registry": ("fastplms.registry", "get_model_registry"),
"get_model_spec": ("fastplms.registry", "get_model_spec"),
"load_model_registry": ("fastplms.registry", "load_model_registry"),
"runtime_profile": ("fastplms.runtime", "runtime_profile"),
}
__all__ = ["__version__", *_LAZY_EXPORTS]
def __getattr__(name: str) -> Any:
try:
module_name, attribute_name = _LAZY_EXPORTS[name]
except KeyError as error:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from error
value = getattr(import_module(module_name), attribute_name)
globals()[name] = value
return value
def __dir__() -> list[str]:
return sorted(set(globals()).union(__all__))
|