update files
Browse files- .gitattributes +1 -0
- README.md +100 -0
- imgs/case.png +3 -0
- imgs/logics-thinking-show.png +3 -0
- imgs/logics_thinking_ch_res.png +3 -0
- imgs/logics_thinking_en_res.png +3 -0
- imgs/logo.png +3 -0
- imgs/radar_thinking_ch.png +3 -0
- imgs/radar_thinking_en.png +3 -0
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,103 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
+
# Logics-Thinking
|
| 5 |
+
|
| 6 |
+
<div align="center">
|
| 7 |
+
<img src="imgs/logo.png" width="80%" >
|
| 8 |
+
</div>
|
| 9 |
+
|
| 10 |
+
<font size=7><div align='center' > [[π GitHub]](https://github.com/alibaba/Logics-Thinking) [[π Logics-Thinking-8B](https://huggingface.co/Logics-MLLM/Logics-Thinking-8B)] [[π Logics-Thinking-32B](https://huggingface.co/Logics-MLLM/Logics-Thinking-32B)] </div></font>
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
## π₯ News
|
| 15 |
+
|
| 16 |
+
* **`2025.09.30`** π We are honored to open source [**Logics-Thinking-32B**](https://huggingface.co/Logics-MLLM/Logics-Thinking-32B), excelling in complex logical and abstract reasoning.
|
| 17 |
+
|
| 18 |
+
* **`2025.09.15`** π We are honored to launch [**Logics-Thinking-8B**](https://huggingface.co/Logics-MLLM/Logics-Thinking-8B), a next-generation multimodal large model developed with great dedication by the **Logics Team** at Alibaba Group. Logics-Thinking is specifically engineered for advanced reasoning tasks, demonstrating outstanding performance in the domain of complex logical and abstract reasoning. This launch marks a key step in our mission to continuously push the frontiers of artificial intelligence, and we are excited for the future it will enable.
|
| 19 |
+
|
| 20 |
+
<p align="center">
|
| 21 |
+
<img src="imgs/radar_thinking_en.png" width="45%" alt="Logics Performance EN">
|
| 22 |
+
<img src="imgs/radar_thinking_ch.png" width="45%" alt="Logics Performance CH">
|
| 23 |
+
</p>
|
| 24 |
+
|
| 25 |
+
<div align="center">
|
| 26 |
+
<img src="imgs/logics-thinking-show.png" width="80%" alt="LOGICS-THINKING Experimental Results">
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
The Logics-Thinking training pipeline comprises three key steps: (1) Long CoT Data Synthesis, which involves Prompt Engineering and Selective Sampling; (2) Model Merging and (3) Advanced Training, which includes Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) methods.
|
| 30 |
+
|
| 31 |
+
## Contents <!-- omit in toc -->
|
| 32 |
+
- [π₯ News](#-news)
|
| 33 |
+
- [π Quick Start](#-quick-start)
|
| 34 |
+
- [π Experimental Results](#-experimental-results)
|
| 35 |
+
- [βοΈ Citation](#οΈ-citation)
|
| 36 |
+
|
| 37 |
+
## π Quick Start
|
| 38 |
+
### Install
|
| 39 |
+
```bash
|
| 40 |
+
pip install -r requirements.txt
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
#### Inference
|
| 44 |
+
```python
|
| 45 |
+
import torch
|
| 46 |
+
from transformers import AutoModelForCausalLM, AutoProcessor
|
| 47 |
+
|
| 48 |
+
image_base64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAwAB/epv2AAAAABJRU5ErkJggg=="
|
| 49 |
+
image_url = "http://path/to/your/image.jpg"
|
| 50 |
+
image_path = "file:///path/to/your/image.jpg"
|
| 51 |
+
video_path = "file:///path/to/video1.mp4"
|
| 52 |
+
text="Please describe this image or video."
|
| 53 |
+
|
| 54 |
+
MODEL_PATH = 'Logics-MLLM/Logics-Thinking-8B'
|
| 55 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 56 |
+
MODEL_PATH,
|
| 57 |
+
torch_dtype="auto",
|
| 58 |
+
device_map="auto",
|
| 59 |
+
trust_remote_code=True,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
processor = AutoProcessor.from_pretrained(
|
| 63 |
+
MODEL_PATH,
|
| 64 |
+
trust_remote_code=True,
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
inputs = processor(
|
| 68 |
+
text=text,
|
| 69 |
+
images=image_path,
|
| 70 |
+
return_tensors="pt"
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
generated_ids = model.generate(**inputs)
|
| 74 |
+
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 75 |
+
|
| 76 |
+
print(generated_text)
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
## π Experimental Results
|
| 83 |
+
|
| 84 |
+
<div align="center">
|
| 85 |
+
<img src="imgs/logics_thinking_en_res.png" width="100%" alt="LOGICS-THINKING Experimental Results">
|
| 86 |
+
<i>Table. Performance comparison on multimodal mathematical and reasoning benchmarks.</i>
|
| 87 |
+
</div>
|
| 88 |
+
<div align="center">
|
| 89 |
+
<img src="imgs/logics_thinking_ch_res.png" width="100%" alt="LOGICS-THINKING Experimental Results">
|
| 90 |
+
<i>Table. Performance comparison of models on multi-subject Chinese benchmark.</i>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
Logics-Thinking-8B exhibits robust performance on evaluation sets requiring sophisticated logical and mathematical skills, such as WeMath, MathVerse, and LogicVista, which demonstrates its advanced capacity for logical reasoning and for solving complex quantitative problems.
|
| 94 |
+
|
| 95 |
+
<div align="center">
|
| 96 |
+
<img src="imgs/case.png" width="100%" alt="LOGICS-THINKING Experimental Results">
|
| 97 |
+
<i>Examples of Responses Generated by the Logics-Thinkingfor Chinese and English Questions.</i>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
## Acknowledgement
|
| 102 |
+
|
| 103 |
+
Logics is developed based on the codebases of the following projects: [SigLIP](https://huggingface.co/google/siglip-so400m-patch14-384),[ConvNeXT](https://huggingface.co/facebook/convnext-large-224), [Qwen3](https://github.com/QwenLM/Qwen3), [Qwen2.5-VL](https://github.com/QwenLM/Qwen2.5-VL), [VLMEvalKit](https://github.com/open-compass/VLMEvalKit). We sincerely thank these projects for their outstanding work.
|
imgs/case.png
ADDED
|
Git LFS Details
|
imgs/logics-thinking-show.png
ADDED
|
Git LFS Details
|
imgs/logics_thinking_ch_res.png
ADDED
|
Git LFS Details
|
imgs/logics_thinking_en_res.png
ADDED
|
Git LFS Details
|
imgs/logo.png
ADDED
|
Git LFS Details
|
imgs/radar_thinking_ch.png
ADDED
|
Git LFS Details
|
imgs/radar_thinking_en.png
ADDED
|
Git LFS Details
|