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
File size: 604 Bytes
a01d066 | 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 | 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)
|