Text Classification
Transformers
Safetensors
English
numo
feature-extraction
gemma4
custom-code
scientific-literature
study-design
decision-model
calibrated
local-inference
custom_code
Instructions to use mycel-ai/Numo-1-E2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mycel-ai/Numo-1-E2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mycel-ai/Numo-1-E2B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mycel-ai/Numo-1-E2B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download example.py from mycel-ai/Numo-1-E2B: direct link, hf CLI and curl.
- Browser
- Download file 960 Bytes
-
https://huggingface.co/mycel-ai/Numo-1-E2B/resolve/main/example.py
- Command line
-
hf download hf://mycel-ai/Numo-1-E2B/example.py
-
curl -L -o example.py https://huggingface.co/mycel-ai/Numo-1-E2B/resolve/main/example.py
960 Bytes
| """Offline contracted scientific decision. MycelAI, Apache-2.0.""" | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| import torch | |
| from transformers import AutoModel, AutoTokenizer | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--model", type=Path, default=Path(__file__).resolve().parent) | |
| parser.add_argument("--device", default="cuda") | |
| args = parser.parse_args() | |
| tokenizer = AutoTokenizer.from_pretrained(args.model, trust_remote_code=True, local_files_only=True) | |
| model = AutoModel.from_pretrained(args.model, trust_remote_code=True, | |
| local_files_only=True, dtype=torch.bfloat16) | |
| model.prepare_for_inference(args.device) | |
| result = model.predict(tokenizer, task="study_approach", text=( | |
| "Title: A synthetic benchmark for sorting algorithms\n" | |
| "Abstract: We compare algorithmic time complexity using generated arrays " | |
| "and prove a bound for a new sorting method.")) | |
| print(json.dumps(result, indent=2)) | |