Image-Text-to-Text
Safetensors
MLX
mlx-vlm
mistral3
apple-silicon
pixtral
guardrail
content-moderation
safety-classification
multimodal
4-bit precision
conversational
Instructions to use AXONVERTEX-AI-RESEARCH/Shieldstral-1.0-3B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AXONVERTEX-AI-RESEARCH/Shieldstral-1.0-3B-MLX-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("AXONVERTEX-AI-RESEARCH/Shieldstral-1.0-3B-MLX-4bit") config = load_config("AXONVERTEX-AI-RESEARCH/Shieldstral-1.0-3B-MLX-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
File size: 2,786 Bytes
e6d9aa8 | 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 51 52 53 54 55 56 57 58 | # GraphShieldMistral Classification Network
GraphShieldMistral converts the Shieldstral hierarchy and classification JSON into a query-aware NetworkX graph.
## Scenario-state contract
A scenario is assigned exactly one presentation state:
| State | Meaning |
|---|---|
| `SAFE` | No raw or descendant-supported unsafe-policy match was observed. |
| `UNRESOLVED` | Broad/raw unsafe matches exist, but no descendant leaf was validated. |
| `CLASSIFIED` | Exactly one descendant leaf was validated. |
| `AMBIGUOUS` | Multiple descendant leaves were validated; the highest-scoring leaf is primary. |
`UNRESOLVED` is intentionally distinct from `SAFE`. For example, strong Cybercrime and System Attacks matches without a Malware leaf are represented as a broad-match/leaf-miss result, not a safe result.
## Scenario panel
The browser panel displays:
- exact submitted document and capture source;
- classification instruction;
- classification state and explanation;
- primary class, score and policy query;
- validated hierarchy path;
- all validated leaves;
- secondary matched leaves for ambiguous results;
- raw unmatched/orphan branches;
- raw and reconciled unsafe flags;
- hierarchy consistency and ambiguity state;
- expected diagnostic category when supplied.
## Clusters
Structural clusters always follow the published superclass hierarchy. Classified and ambiguous scenarios are grouped by the superclass of the primary validated leaf. Safe and unresolved results use explicit `STATUS_SAFE` and `STATUS_UNRESOLVED` clusters. Empirical NetworkX communities are derived only from validated leaf co-occurrence and remain separate from the structural taxonomy.
## Exports
- `classification-network.html`
- `classification-network.svg`
- `classification-network.graphml`
- `classification-network.json`
- `classification-clusters.json`
- optional co-classification GraphML and JSON
The cluster summary includes `classification_status_counts`, detailed validated leaves, secondary leaves, raw unmatched branches, expected-category outcomes and hierarchy-consistency fields.
## Diagnostic contract semantics
Controlled scenarios may specify an intended primary category, a required category-presence rule, and a set of allowed states. This is more precise than requiring every positive example to be `CLASSIFIED`:
- `CLASSIFIED,AMBIGUOUS` means the intended primary category must be correct, while secondary leaves remain visible rather than being suppressed;
- `UNRESOLVED` with an `absent` leaf requirement records a deliberate broad-match/leaf-miss probe;
- an ambiguity probe can require `AMBIGUOUS` and a specific primary category.
`--strict-expectations` verifies this diagnostic contract. It does not reinterpret model output or remove secondary classifications.
|