Update README.md
Browse files
README.md
CHANGED
|
@@ -13,200 +13,150 @@ language:
|
|
| 13 |
- en
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 19 |
-
MATRIX-PT is a parameter-efficient LoRA adapter released by Radical AI for Qwen/Qwen2-VL-7B. It is designed to study post-training adaptations for materials science tasks, including theoretical reasoning, scientific problem solving, and multimodal reasoning over experimental images.
|
| 20 |
|
| 21 |
-
|
| 22 |
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
### Model Description
|
| 27 |
-
- **Developed by:** Radical AI
|
| 28 |
-
- **Model type:** LoRA adapter (PEFT) for a multimodal transformer
|
| 29 |
-
- **Base model:** `Qwen/Qwen2-VL-7B`
|
| 30 |
-
- **Language(s):** English
|
| 31 |
-
- **License:**
|
| 32 |
- **Finetuned from model:** `Qwen/Qwen2-VL-7B`
|
| 33 |
|
|
|
|
| 34 |
|
| 35 |
-
### Model Sources
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
|
| 39 |
-
-
|
| 40 |
-
- **Paper [optional]:** [More Information Needed]
|
| 41 |
-
- **Demo [optional]:** [More Information Needed]
|
| 42 |
|
| 43 |
## Uses
|
| 44 |
|
| 45 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 46 |
-
|
| 47 |
### Direct Use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
[More Information Needed]
|
| 52 |
-
|
| 53 |
-
### Downstream Use [optional]
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
### Out-of-Scope Use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
[More Information Needed]
|
| 64 |
|
| 65 |
## Bias, Risks, and Limitations
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
|
| 71 |
### Recommendations
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 76 |
|
| 77 |
## How to Get Started with the Model
|
| 78 |
|
| 79 |
-
Use the code below to get started with the model.
|
| 80 |
-
|
| 81 |
-
|
| 82 |
### Install
|
| 83 |
```bash
|
| 84 |
pip install -U transformers peft accelerate torch
|
| 85 |
```
|
| 86 |
-
## Training Details
|
| 87 |
-
|
| 88 |
-
### Training Data
|
| 89 |
-
|
| 90 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
|
|
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
| 101 |
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
-
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
-
|
| 108 |
|
| 109 |
-
|
| 110 |
|
| 111 |
-
|
|
|
|
|
|
|
| 112 |
|
| 113 |
## Evaluation
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
### Testing Data, Factors & Metrics
|
| 118 |
-
|
| 119 |
-
#### Testing Data
|
| 120 |
-
|
| 121 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 122 |
-
|
| 123 |
-
[More Information Needed]
|
| 124 |
-
|
| 125 |
-
#### Factors
|
| 126 |
-
|
| 127 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 128 |
|
| 129 |
-
|
| 130 |
|
| 131 |
-
###
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 134 |
|
| 135 |
-
|
| 136 |
|
| 137 |
-
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
-
|
| 140 |
|
| 141 |
-
##
|
| 142 |
|
|
|
|
| 143 |
|
|
|
|
| 144 |
|
| 145 |
-
##
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
[More Information Needed]
|
| 150 |
-
|
| 151 |
-
## Environmental Impact
|
| 152 |
-
|
| 153 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 154 |
-
|
| 155 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 156 |
-
|
| 157 |
-
- **Hardware Type:** [More Information Needed]
|
| 158 |
-
- **Hours used:** [More Information Needed]
|
| 159 |
-
- **Cloud Provider:** [More Information Needed]
|
| 160 |
-
- **Compute Region:** [More Information Needed]
|
| 161 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 162 |
-
|
| 163 |
-
## Technical Specifications [optional]
|
| 164 |
-
|
| 165 |
-
### Model Architecture and Objective
|
| 166 |
-
|
| 167 |
-
[More Information Needed]
|
| 168 |
-
|
| 169 |
-
### Compute Infrastructure
|
| 170 |
-
|
| 171 |
-
[More Information Needed]
|
| 172 |
-
|
| 173 |
-
#### Hardware
|
| 174 |
-
|
| 175 |
-
[More Information Needed]
|
| 176 |
-
|
| 177 |
-
#### Software
|
| 178 |
-
|
| 179 |
-
[More Information Needed]
|
| 180 |
-
|
| 181 |
-
## Citation [optional]
|
| 182 |
-
|
| 183 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 184 |
-
|
| 185 |
-
**BibTeX:**
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
**APA:**
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Glossary [optional]
|
| 194 |
-
|
| 195 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 196 |
-
|
| 197 |
-
[More Information Needed]
|
| 198 |
-
|
| 199 |
-
## More Information [optional]
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
## Model Card Authors [optional]
|
| 204 |
-
|
| 205 |
-
[More Information Needed]
|
| 206 |
-
|
| 207 |
-
## Model Card Contact
|
| 208 |
|
| 209 |
-
|
| 210 |
-
### Framework versions
|
| 211 |
|
| 212 |
-
|
|
|
|
| 13 |
- en
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# MATRIX-PT
|
| 17 |
|
| 18 |
+
MATRIX-PT is a parameter-efficient LoRA adapter released by **Radical AI** for **Qwen/Qwen2-VL-7B**. It is designed to study post-training adaptations for materials science tasks, with a focus on theoretical reasoning, scientific problem solving, and multimodal reasoning over experimental images.
|
|
|
|
| 19 |
|
| 20 |
+
This model is released alongside the **MATRIX** benchmark ([dataset link](https://huggingface.co/datasets/radical-ai/MATRIX)), which is used to evaluate reasoning across text- and image-based materials science tasks.
|
| 21 |
|
| 22 |
+
---
|
| 23 |
|
| 24 |
+
## Model Details
|
| 25 |
|
| 26 |
### Model Description
|
| 27 |
+
- **Developed by:** Radical AI
|
| 28 |
+
- **Model type:** LoRA adapter (PEFT) for a multimodal transformer
|
| 29 |
+
- **Base model:** `Qwen/Qwen2-VL-7B`
|
| 30 |
+
- **Language(s):** English
|
| 31 |
+
- **License:** Apache-2.0 (adapter); base model license applies to `Qwen/Qwen2-VL-7B`
|
| 32 |
- **Finetuned from model:** `Qwen/Qwen2-VL-7B`
|
| 33 |
|
| 34 |
+
MATRIX-PT modifies the base model through lightweight post-training to better surface domain-relevant reasoning patterns in materials science. The adapter primarily affects inference-time behavior, improving the model’s ability to reason about structured scientific concepts and experimental imagery without altering the underlying base weights.
|
| 35 |
|
| 36 |
+
### Model Sources
|
| 37 |
+
- **Repository:** https://huggingface.co/radical-ai/MATRIX-PT
|
| 38 |
+
- **Paper:** *link to preprint*
|
| 39 |
+
- **Benchmark:** https://huggingface.co/datasets/radical-ai/MATRIX
|
| 40 |
|
| 41 |
+
---
|
|
|
|
|
|
|
| 42 |
|
| 43 |
## Uses
|
| 44 |
|
|
|
|
|
|
|
| 45 |
### Direct Use
|
| 46 |
+
MATRIX-PT is intended for:
|
| 47 |
+
- Evaluating multimodal reasoning in materials science
|
| 48 |
+
- Studying post-training effects on scientific reasoning behavior
|
| 49 |
+
- Benchmarking model performance on theory-driven and experiment-driven tasks using MATRIX
|
| 50 |
|
| 51 |
+
The adapter can be loaded on top of `Qwen/Qwen2-VL-7B` using PEFT without modifying the base model weights.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
+
### Downstream Use
|
| 54 |
+
The adapter may be used as a starting point for:
|
| 55 |
+
- Further domain-specific fine-tuning
|
| 56 |
+
- Diagnostic studies of reasoning behavior in scientific models
|
| 57 |
+
- Comparative evaluation against other multimodal or domain-adapted models
|
| 58 |
|
| 59 |
### Out-of-Scope Use
|
| 60 |
+
MATRIX-PT is **not** intended for:
|
| 61 |
+
- General-purpose conversational use
|
| 62 |
+
- High-stakes decision making (e.g., medical, legal, industrial control)
|
| 63 |
+
- Deployment without human oversight in safety-critical settings
|
| 64 |
|
| 65 |
+
---
|
|
|
|
|
|
|
| 66 |
|
| 67 |
## Bias, Risks, and Limitations
|
| 68 |
|
| 69 |
+
- MATRIX-PT inherits limitations and biases from the base model, including potential hallucinations and incorrect reasoning.
|
| 70 |
+
- The adapter is trained and evaluated on a focused materials science benchmark and may not generalize outside this domain.
|
| 71 |
+
- Performance improvements are task- and prompt-dependent and should not be interpreted as broad scientific understanding.
|
| 72 |
+
- As with most LLMs/VLMs, the model may produce plausible-sounding but incorrect explanations.
|
| 73 |
|
| 74 |
### Recommendations
|
| 75 |
+
Users should:
|
| 76 |
+
- Treat outputs as assistive rather than authoritative
|
| 77 |
+
- Validate results against domain expertise or ground truth
|
| 78 |
+
- Use MATRIX-PT primarily for evaluation, analysis, and research purposes
|
| 79 |
|
| 80 |
+
---
|
|
|
|
|
|
|
| 81 |
|
| 82 |
## How to Get Started with the Model
|
| 83 |
|
|
|
|
|
|
|
|
|
|
| 84 |
### Install
|
| 85 |
```bash
|
| 86 |
pip install -U transformers peft accelerate torch
|
| 87 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
### Load the Adapter
|
| 90 |
+
``` python
|
| 91 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 92 |
+
from peft import PeftModel
|
| 93 |
+
import torch
|
| 94 |
|
| 95 |
+
base_id = "Qwen/Qwen2-VL-7B"
|
| 96 |
+
adapter_id = "radical-ai/MATRIX-PT"
|
| 97 |
|
| 98 |
+
tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
|
| 99 |
|
| 100 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 101 |
+
base_id,
|
| 102 |
+
device_map="auto",
|
| 103 |
+
torch_dtype=torch.bfloat16,
|
| 104 |
+
trust_remote_code=True,
|
| 105 |
+
)
|
| 106 |
|
| 107 |
+
model = PeftModel.from_pretrained(base_model, adapter_id)
|
| 108 |
+
model.eval()
|
| 109 |
+
```
|
| 110 |
|
| 111 |
+
## Training Details
|
| 112 |
+
### Training Data
|
| 113 |
|
| 114 |
+
The adapter was trained using a curated materials science dataset emphasizing:
|
| 115 |
|
| 116 |
+
- Foundational theory questions
|
| 117 |
+
- Research-level reasoning
|
| 118 |
+
- Hypothesis generation
|
| 119 |
+
- Multimodal reasoning over experimental imagery
|
| 120 |
|
| 121 |
+
For evaluation details, see the [MATRIX dataset](https://huggingface.co/datasets/radical-ai/MATRIX) card and accompanying paper.
|
| 122 |
|
| 123 |
+
### Training Procedure
|
| 124 |
|
| 125 |
+
- Method: LoRA (parameter-efficient fine-tuning)
|
| 126 |
+
- Objective: Improve accessibility of materials science-relevant reasoning patterns during inference
|
| 127 |
+
- Training regime: Mixed precision (bf16)
|
| 128 |
|
| 129 |
## Evaluation
|
| 130 |
|
| 131 |
+
### Testing Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
+
MATRIX-PT is benchmarked on the **MATRIX** dataset, which consists of both textual and visual reasoning tasks in materials science. Evaluation compares the adapted model against the base `Qwen/Qwen2-VL-7B` model under identical prompting and decoding settings.
|
| 134 |
|
| 135 |
+
### Metrics
|
| 136 |
+
- Task accuracy
|
| 137 |
+
- Reasoning consistency across related prompts
|
| 138 |
+
- Qualitative error analysis (see accompanying paper)
|
| 139 |
|
|
|
|
| 140 |
|
| 141 |
+
## Results
|
| 142 |
|
| 143 |
+
Across MATRIX tasks, MATRIX-PT demonstrates improved performance relative to the base model, particularly on:
|
| 144 |
+
- Theory-driven reasoning questions
|
| 145 |
+
- Structured scientific problem solving
|
| 146 |
+
- Interpretation of experimental images
|
| 147 |
|
| 148 |
+
These improvements primarily manifest at inference time, highlighting the role of post-training in shaping reasoning accessibility rather than training-time memorization alone.
|
| 149 |
|
| 150 |
+
## Citation
|
| 151 |
|
| 152 |
+
If you use this model or the MATRIX benchmark, please cite the accompanying paper:
|
| 153 |
|
| 154 |
+
[MATRIX: A Multimodal Benchmark and Post-Training Framework for Materials Science]()
|
| 155 |
|
| 156 |
+
### Bibtex
|
| 157 |
+
```
|
| 158 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
+
### Framework Versions
|
|
|
|
| 161 |
|
| 162 |
+
PEFT 0.18.0
|