Text Generation
GGUF
English
medical
llama-cpp
gguf-my-repo
Inference Endpoints
conversational
Triangle104 commited on
Commit
0db8117
·
verified ·
1 Parent(s): e538851

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md CHANGED
@@ -17,6 +17,47 @@ tags:
17
  This model was converted to GGUF format from [`FreedomIntelligence/HuatuoGPT-o1-8B`](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
18
  Refer to the [original model card](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) for more details on the model.
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  ## Use with llama.cpp
21
  Install llama.cpp through brew (works on Mac and Linux)
22
 
 
17
  This model was converted to GGUF format from [`FreedomIntelligence/HuatuoGPT-o1-8B`](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
18
  Refer to the [original model card](https://huggingface.co/FreedomIntelligence/HuatuoGPT-o1-8B) for more details on the model.
19
 
20
+ ---
21
+ Model details:
22
+ -
23
+ 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.
24
+
25
+ Usage
26
+ You can use HuatuoGPT-o1 in the same way as Llama-3.1-8B-Instruct. You can deploy it with tools like vllm or Sglang, or perform direct inference:
27
+
28
+ from transformers import AutoModelForCausalLM, AutoTokenizer
29
+
30
+ model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-8B",torch_dtype="auto",device_map="auto")
31
+ tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/HuatuoGPT-o1-8B")
32
+
33
+ input_text = "How to stop a cough?"
34
+ messages = [{"role": "user", "content": input_text}]
35
+
36
+ inputs = tokenizer(tokenizer.apply_chat_template(messages, tokenize=False,add_generation_prompt=True
37
+ ), return_tensors="pt").to(model.device)
38
+ outputs = model.generate(**inputs, max_new_tokens=2048)
39
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
40
+
41
+ HuatuoGPT-o1 adopts a thinks-before-it-answers approach, with outputs formatted as:
42
+
43
+ ## Thinking
44
+ [Reasoning process]
45
+
46
+ ## Final Response
47
+ [Output]
48
+
49
+ 📖 Citation
50
+ @misc{chen2024huatuogpto1medicalcomplexreasoning,
51
+ title={HuatuoGPT-o1, Towards Medical Complex Reasoning with LLMs},
52
+ author={Junying Chen and Zhenyang Cai and Ke Ji and Xidong Wang and Wanlong Liu and Rongsheng Wang and Jianye Hou and Benyou Wang},
53
+ year={2024},
54
+ eprint={2412.18925},
55
+ archivePrefix={arXiv},
56
+ primaryClass={cs.CL},
57
+ url={https://arxiv.org/abs/2412.18925},
58
+ }
59
+
60
+ ---
61
  ## Use with llama.cpp
62
  Install llama.cpp through brew (works on Mac and Linux)
63