Feature Extraction
Transformers
Safetensors
lagrange_flash
custom-code
mathematics
physics
mechanistic-interpretability
program-synthesis
research
custom_code
Instructions to use FlaneAI/LaGrange-1.0-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FlaneAI/LaGrange-1.0-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="FlaneAI/LaGrange-1.0-Flash", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("FlaneAI/LaGrange-1.0-Flash", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download example_inference.py from FlaneAI/LaGrange-1.0-Flash: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/FlaneAI/LaGrange-1.0-Flash/resolve/main/example_inference.py
- Command line
-
hf download hf://FlaneAI/LaGrange-1.0-Flash/example_inference.py
-
curl -L -o example_inference.py https://huggingface.co/FlaneAI/LaGrange-1.0-Flash/resolve/main/example_inference.py
604 Bytes
| from transformers import AutoModel, AutoTokenizer | |
| REPO_ID = "YOUR_ORG/LaGrange-1.0-Flash" | |
| REVISION = "main" | |
| tokenizer = AutoTokenizer.from_pretrained( | |
| REPO_ID, | |
| revision=REVISION, | |
| trust_remote_code=True, | |
| ) | |
| model = AutoModel.from_pretrained( | |
| REPO_ID, | |
| revision=REVISION, | |
| trust_remote_code=True, | |
| ) | |
| batch = tokenizer("machine learning mathematics", return_tensors="pt") | |
| bridge_output = model(**batch) | |
| print(bridge_output.pooler_output.shape) | |
| result = model.research({ | |
| "domain": "ml_math", | |
| "action": "softmax_jacobian", | |
| "logits": [0.2, -0.1, 1.3, 2.0], | |
| }) | |
| print(result) | |