Text Generation
Safetensors
English
medical
jymcc commited on
Commit
47fa2b0
·
verified ·
1 Parent(s): 83288bb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -3
README.md CHANGED
@@ -1,3 +1,77 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - FreedomIntelligence/medical-o1-reasoning-SFT
5
+ language:
6
+ - en
7
+ base_model:
8
+ - meta-llama/Llama-3.1-8B-Instruct
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - medical
12
+ ---
13
+
14
+ <div align="center">
15
+ <h1>
16
+ HuatuoGPT-o1-8B
17
+ </h1>
18
+ </div>
19
+
20
+ <div align="center">
21
+ <a href="https://github.com/FreedomIntelligence/HuatuoGPT-o1" target="_blank">GitHub</a> | <a href="https://arxiv.org/abs/2406.19280" target="_blank">Paper</a>
22
+ </div>
23
+
24
+ # <span>Introduction</span>
25
+ **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.
26
+
27
+ For more information, visit our GitHub repository:
28
+ [https://github.com/FreedomIntelligence/HuatuoGPT-o1](https://github.com/FreedomIntelligence/HuatuoGPT-o1).
29
+
30
+ # <span>Model Info</span>
31
+ | | Backbone | Supported Languages | Link |
32
+ | -------------------- | ------------ | ----- | --------------------------------------------------------------------- |
33
+ | **HuatuoGPT-o1-8B** | LLaMA-3.1-8B | English | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) |
34
+ | **HuatuoGPT-o1-70B** | LLaMA-3.1-70B | English | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-70B) |
35
+ | **HuatuoGPT-o1-7B** | Qwen2.5-7B | English & Chinese | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-7B) |
36
+ | **HuatuoGPT-o1-72B** | Qwen2.5-72B | English & Chinese | [HF Link](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-72B) |
37
+
38
+
39
+
40
+ # <span>Usage</span>
41
+ You can use HuatuoGPT-o1 in the same way as `Llama-3.1-8B-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:
42
+ ```python
43
+ from transformers import AutoModelForCausalLM, AutoTokenizer
44
+
45
+ model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-8B",torch_dtype="auto",device_map="auto")
46
+ tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-8B")
47
+
48
+ input_text = "How to stop a cough?"
49
+ messages = [{"role": "user", "content": input_text}]
50
+
51
+ inputs = tokenizer(tokenizer.apply_chat_template(messages, tokenize=False,add_generation_prompt=True
52
+ ), return_tensors="pt").to(model.device)
53
+ outputs = model.generate(**inputs, max_new_tokens=2048)
54
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
55
+ ```
56
+
57
+ HuatuoGPT-o1 adopts a *thinks-before-it-answers* approach, with outputs formatted as:
58
+
59
+ ```
60
+ ## Thinking
61
+ [Reasoning process]
62
+
63
+ ## Final Response
64
+ [Output]
65
+ ```
66
+
67
+ # <span>📖 Citation</span>
68
+ ```
69
+ @misc{chen2024huatuogpto1,
70
+ title={HuatuoGPT-o1, Towards Medical Complex Reasoning with LLMs},
71
+ author={Junying Chen and Zhenyang Cai and Ke Ji and Xidong Wang and Wanlong Liu1 and Rongsheng Wang and Jianye Hou and Benyou Wang},
72
+ year={2024}
73
+ }
74
+ ```
75
+
76
+
77
+