Image-Text-to-Text
Transformers
Safetensors
English
reasoning
thinking_modes
qwen3
grape
nla
natural_language_autoencoder
interpretability
Instructions to use SL-AI/GRaPE-2.1-Flash-NLA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SL-AI/GRaPE-2.1-Flash-NLA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="SL-AI/GRaPE-2.1-Flash-NLA")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SL-AI/GRaPE-2.1-Flash-NLA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SL-AI/GRaPE-2.1-Flash-NLA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SL-AI/GRaPE-2.1-Flash-NLA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SL-AI/GRaPE-2.1-Flash-NLA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SL-AI/GRaPE-2.1-Flash-NLA
- SGLang
How to use SL-AI/GRaPE-2.1-Flash-NLA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SL-AI/GRaPE-2.1-Flash-NLA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SL-AI/GRaPE-2.1-Flash-NLA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SL-AI/GRaPE-2.1-Flash-NLA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SL-AI/GRaPE-2.1-Flash-NLA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SL-AI/GRaPE-2.1-Flash-NLA with Docker Model Runner:
docker model run hf.co/SL-AI/GRaPE-2.1-Flash-NLA
| { | |
| "config": "nla_config.json", | |
| "checkpoint": "SL-AI/GRaPE-2.1-Flash-NLA", | |
| "held_out_n": 80, | |
| "fit_n": 100, | |
| "best_of": 24, | |
| "max_new_tokens": 50, | |
| "random_retrieval": 0.0125, | |
| "metric": "FVE (fraction of variance explained), cosine, retrieval@1", | |
| "PRIMARY_AV_generative_roundtrip": { | |
| "greedy_raw": { | |
| "cos": 0.11685206741094589, | |
| "retr@1": 0.26249998807907104, | |
| "fve": -0.6114729642868042 | |
| }, | |
| "greedy_magcal": { | |
| "cos": 0.11685206741094589, | |
| "retr@1": 0.26249998807907104, | |
| "fve": -0.002733588218688965 | |
| }, | |
| "bestofK_raw": { | |
| "cos": 0.2748314440250397, | |
| "retr@1": 0.75, | |
| "fve": -0.312843918800354 | |
| }, | |
| "bestofK_magcal": { | |
| "cos": 0.2748314440250397, | |
| "retr@1": 0.75, | |
| "fve": 0.026947617530822754 | |
| }, | |
| "bestofK_perdim_cal": { | |
| "cos": 0.15629741549491882, | |
| "retr@1": 0.5, | |
| "fve": 0.0061414241790771484 | |
| }, | |
| "note": "activation -> generated text -> activation; the real 'thought from a hidden state'" | |
| }, | |
| "SECONDARY_given_text_reconstruction": { | |
| "raw": { | |
| "cos": 0.9040088653564453, | |
| "retr@1": 0.987500011920929, | |
| "fve": 0.814344048500061 | |
| }, | |
| "perdim_cal": { | |
| "cos": 0.9016216993331909, | |
| "retr@1": 0.987500011920929, | |
| "fve": 0.8100962042808533 | |
| }, | |
| "note": "AR text->activation; presupposes the text, NOT a generated thought" | |
| }, | |
| "distinct_readings": "78/80", | |
| "coherent_fraction": 1.0, | |
| "on_topic_jaccard": { | |
| "own": 0.18751889010740513, | |
| "random": 0.048980255730286325, | |
| "ratio": 3.8284587802071273 | |
| }, | |
| "avg_reading_words": 26.7, | |
| "sample_readings_by_cosine": [ | |
| { | |
| "cosine": 0.956, | |
| "reading": "Sure! My phone number is 555-123-2002, and my name is John Smith." | |
| }, | |
| { | |
| "cosine": 0.332, | |
| "reading": "Alright, I checked the top of my screen. It says there's a signal and that mobile data is working, but it also shows \"Data Disabled.\" Right now I see airplane mode isn't on, so hopefully things are ok" | |
| }, | |
| { | |
| "cosine": 0.245, | |
| "reading": "How have specific environmental factors contributed to the evolution of unique species assemblages in tropical ecosystems?" | |
| }, | |
| { | |
| "cosine": 0.195, | |
| "reading": "A 62.2 kg object is pushed with a force of 83.2 N at an angle of 41.5 degrees to the horizontal. Calculate the acceleration and net work done on it if it moves through a distance of" | |
| }, | |
| { | |
| "cosine": 0.003, | |
| "reading": "Compute (74856 * 392) mod 10. Show each step." | |
| } | |
| ] | |
| } |