aashish1904
commited on
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
|
4 |
+
license: apache-2.0
|
5 |
+
datasets:
|
6 |
+
- FreedomIntelligence/medical-o1-reasoning-SFT
|
7 |
+
- FreedomIntelligence/medical-o1-verifiable-problem
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
- zh
|
11 |
+
base_model:
|
12 |
+
- Qwen/Qwen2.5-7B-Instruct
|
13 |
+
pipeline_tag: text-generation
|
14 |
+
tags:
|
15 |
+
- medical
|
16 |
+
|
17 |
+
---
|
18 |
+
|
19 |
+
[![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
|
20 |
+
|
21 |
+
|
22 |
+
# QuantFactory/HuatuoGPT-o1-7B-GGUF
|
23 |
+
This is quantized version of [FreedomIntelligence/HuatuoGPT-o1-7B](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-7B) created using llama.cpp
|
24 |
+
|
25 |
+
# Original Model Card
|
26 |
+
|
27 |
+
|
28 |
+
<div align="center">
|
29 |
+
<h1>
|
30 |
+
HuatuoGPT-o1-7B
|
31 |
+
</h1>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div align="center">
|
35 |
+
<a href="https://github.com/FreedomIntelligence/HuatuoGPT-o1" target="_blank">GitHub</a> | <a href="https://arxiv.org/pdf/2412.18925" target="_blank">Paper</a>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
# <span>Introduction</span>
|
39 |
+
**HuatuoGPT-o1** is a medical LLM designed for advanced medical reasoning. It generates a complex thought process, reflecting and refining its reasoning, before providing a final response.
|
40 |
+
|
41 |
+
For more information, visit our GitHub repository:
|
42 |
+
[https://github.com/FreedomIntelligence/HuatuoGPT-o1](https://github.com/FreedomIntelligence/HuatuoGPT-o1).
|
43 |
+
|
44 |
+
# <span>Model Info</span>
|
45 |
+
| | Backbone | Supported Languages | Link |
|
46 |
+
| -------------------- | ------------ | ----- | --------------------------------------------------------------------- |
|
47 |
+
| **HuatuoGPT-o1-8B** | LLaMA-3.1-8B | English | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) |
|
48 |
+
| **HuatuoGPT-o1-70B** | LLaMA-3.1-70B | English | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-70B) |
|
49 |
+
| **HuatuoGPT-o1-7B** | Qwen2.5-7B | English & Chinese | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-7B) |
|
50 |
+
| **HuatuoGPT-o1-72B** | Qwen2.5-72B | English & Chinese | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-72B) |
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
# <span>Usage</span>
|
55 |
+
You can use HuatuoGPT-o1-7B in the same way as `Qwen2.5-7B-Instruct`. You can deploy it with tools like [vllm](https://github.com/vllm-project/vllm) or [Sglang](https://github.com/sgl-project/sglang), or perform direct inference:
|
56 |
+
```python
|
57 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
58 |
+
|
59 |
+
model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-7B",torch_dtype="auto",device_map="auto")
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-7B")
|
61 |
+
|
62 |
+
input_text = "How to stop a cough?"
|
63 |
+
messages = [{"role": "user", "content": input_text}]
|
64 |
+
|
65 |
+
inputs = tokenizer(tokenizer.apply_chat_template(messages, tokenize=False,add_generation_prompt=True
|
66 |
+
), return_tensors="pt").to(model.device)
|
67 |
+
outputs = model.generate(**inputs, max_new_tokens=2048)
|
68 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
69 |
+
```
|
70 |
+
|
71 |
+
HuatuoGPT-o1 adopts a *thinks-before-it-answers* approach, with outputs formatted as:
|
72 |
+
|
73 |
+
```
|
74 |
+
## Thinking
|
75 |
+
[Reasoning process]
|
76 |
+
|
77 |
+
## Final Response
|
78 |
+
[Output]
|
79 |
+
```
|
80 |
+
|
81 |
+
# <span>📖 Citation</span>
|
82 |
+
```
|
83 |
+
@misc{chen2024huatuogpto1medicalcomplexreasoning,
|
84 |
+
title={HuatuoGPT-o1, Towards Medical Complex Reasoning with LLMs},
|
85 |
+
author={Junying Chen and Zhenyang Cai and Ke Ji and Xidong Wang and Wanlong Liu and Rongsheng Wang and Jianye Hou and Benyou Wang},
|
86 |
+
year={2024},
|
87 |
+
eprint={2412.18925},
|
88 |
+
archivePrefix={arXiv},
|
89 |
+
primaryClass={cs.CL},
|
90 |
+
url={https://arxiv.org/abs/2412.18925},
|
91 |
+
}
|
92 |
+
```
|