Instructions to use Raymond-dev-546730/ClinicalThought-AI-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Raymond-dev-546730/ClinicalThought-AI-8B with PEFT:
Task type is invalid.
- llama-cpp-python
How to use Raymond-dev-546730/ClinicalThought-AI-8B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Raymond-dev-546730/ClinicalThought-AI-8B", filename="Model_Weights/llama.cpp/ClinicalThought-AI-8B-IQ3_XS.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Raymond-dev-546730/ClinicalThought-AI-8B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Use Docker
docker model run hf.co/Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Raymond-dev-546730/ClinicalThought-AI-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Raymond-dev-546730/ClinicalThought-AI-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Raymond-dev-546730/ClinicalThought-AI-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
- Ollama
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Ollama:
ollama run hf.co/Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
- Unsloth Studio new
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Raymond-dev-546730/ClinicalThought-AI-8B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Raymond-dev-546730/ClinicalThought-AI-8B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Raymond-dev-546730/ClinicalThought-AI-8B to start chatting
- Pi new
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Docker Model Runner:
docker model run hf.co/Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
- Lemonade
How to use Raymond-dev-546730/ClinicalThought-AI-8B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Raymond-dev-546730/ClinicalThought-AI-8B:Q4_K_M
Run and chat with the model
lemonade run user.ClinicalThought-AI-8B-Q4_K_M
List all available models
lemonade list
ClinicalThought-AI-8B delivers comprehensive clinical reasoning and diagnostic support designed specifically to assist medical professionals in complex patient care scenarios. This open source model provides transparent, step-by-step analysis across diverse medical cases while maintaining appropriate clinical boundaries.
Key Capabilities
- Clinical Reasoning: Shows transparent step-by-step diagnostic thinking and clinical decision-making process
- Multi-Specialty Medical Analysis: Handles complex cases across infectious disease, oncology, endocrinology, emergency medicine, and other specialties
- Professional Medical Support: Educational tool, case consultation, and clinical decision support for qualified healthcare providers
See It In Action:
Input Example:
I'm an internal medicine resident presenting a complex case at grand rounds. I'd like your help with clinical reasoning and differential diagnosis: A 34-year-old accountant presents with a 4-month history of intermittent abdominal pain, bloating, and alternating diarrhea and constipation. She reports feeling "foggy" mentally and has noticed her hair thinning. She's gained 8 pounds despite eating less due to nausea. Her periods have become irregular over the past year.
Relevant History: No significant past medical history, takes a daily multivitamin, no known drug allergies, no recent travel, works long hours with high stress levels.
Physical Exam Findings: Vitals normal, mild abdominal distension, no organomegaly, normal neurological exam, no skin lesions or rashes, normal thyroid palpation.
Initial Labs: mild iron deficiency anemia, low vitamin D, slightly elevated TSH at 6.2 (normal 0.4-4.0), normal comprehensive metabolic panel.
Please provide your assessment using this format: 1. Clinical Summary 2. Differential Diagnosis 3. Recommended Workup 4. Next Steps
Output Example:
The model produces structured output with two components:
1. The Clinical Thinking Process
<think>
Alright, let's think about this. The patient is a 34-year-old woman who's been having these troubling symptoms for quite some time now—abdominal pain, bloating, and this annoying mix of diarrhea and constipation. That sounds like it could be something affecting her gut, maybe an inflammatory condition or even something autoimmune.
Now, she's also feeling mentally foggy and has noticed her hair thinning out. That's interesting because it hints at some systemic issue that might not just be in her gut. And she's gained weight even though she's trying to eat less due to nausea. Hmm, that's a bit unusual for someone who's supposedly eating less.
Her periods have become irregular over the past year, which could be tied to hormonal changes or maybe something more systemic like an autoimmune condition. Stress from her job is a factor too, but let's focus on the medical aspects first.
On the physical exam, nothing too alarming jumps out—no organ enlargement or neurological issues, which is good to know. But she does have mild abdominal distension, which could be related to her gut symptoms.
Looking at her lab results, there's mild iron deficiency anemia and low vitamin D. That's something to note, especially with the iron deficiency pointing towards malabsorption. Her TSH is slightly elevated at 6.2, which is just a bit outside the normal range but not screaming hypothyroidism yet.
Putting all this together, I'm thinking about conditions that could explain her symptoms. Hashimoto's thyroiditis comes to mind because it can cause fatigue and weight changes, plus it might explain the irregular periods if her thyroid function is off. And then there's celiac disease, which fits with her gut issues and the malabsorption.
To really get to the bottom of this, I think we need to do some specific tests. A tissue transglutaminase IgA test would help us check for celiac disease. And since we're considering thyroid issues, a free T4 test could give us more insight into her thyroid function. Maybe even an EMA or EMA-ECA test if we're leaning towards celiac.
So, the next steps would be to order these tests and see where they lead us. If it's celiac, a gluten-free diet could really help her symptoms. And if it's Hashimoto's, managing her thyroid function might be key. It's all about connecting the dots with the right tests and then tailoring treatment based on what we find.
</think>
2. The Structured Clinical Assessment
<answer>
1. **Clinical Summary**: The patient is a 34-year-old woman presenting with a four-month history of gastrointestinal symptoms, including abdominal pain, bloating, and alternating diarrhea and constipation. She also reports mental fogginess, hair thinning, weight gain despite reduced intake, and irregular menstrual cycles. Physical examination reveals mild abdominal distension with no significant findings otherwise. Laboratory tests show mild iron deficiency anemia, low vitamin D levels, and a slightly elevated TSH.
2. **Differential Diagnosis**:
- **Celiac Disease**: Given the gastrointestinal symptoms, malabsorption (indicated by iron deficiency anemia and low vitamin D), and potential systemic effects, celiac disease is a strong consideration.
- **Hashimoto's Thyroiditis**: The slightly elevated TSH and systemic symptoms such as fatigue, weight changes, and irregular menstruation could suggest an autoimmune thyroid condition.
- **Inflammatory Bowel Disease (IBD)**: Could explain the gastrointestinal symptoms but typically presents with more pronounced diarrhea or other systemic signs.
- **Other Autoimmune Conditions**: Potential for overlapping autoimmune conditions affecting both the gut and other systems.
3. **Recommended Workup**:
- **Tissue Transglutaminase IgA (tTG-IgA) Test**: To assess for celiac disease.
- **Free T4 Test**: To evaluate thyroid function more accurately, especially with the slightly elevated TSH.
- **Endomysial Antibody (EMA) and Endomysial Antibody-Endomysium Antibody (ECA) Tests**: If celiac disease is suspected, these tests can provide additional supportive evidence.
- **Stool Studies for Infectious Causes**: To rule out infectious enteritis if symptoms are intermittent and suggestive of an infection.
4. **Next Steps**:
- If celiac disease is suspected, initiate a gluten-free diet while awaiting test results to potentially alleviate symptoms.
- If thyroid dysfunction is confirmed, consider initiating levothyroxine therapy to manage hypothyroidism.
- Further evaluation for other autoimmune conditions may be warranted based on test results and clinical presentation.
</answer>
Getting Started
1. Installation
Choose your deployment method and install the required dependencies:
# For SafeTensors
pip install torch transformers accelerate safetensors
# For LLaMa.cpp
pip install llama-cpp-python
2. Configuration
Download and edit your chosen inference script to customize the analysis:
- Input data: Update the
MEDICAL_QUERYvariable with your clinical question or case - Model location: Set the
model_pathvariable to your downloaded model directory
3. Running Analysis
Run your script and the research plan will appear in the terminal:
# For SafeTensors
python Inference_safetensors.py
# For LLaMa.cpp
python Inference_llama.cpp.py
Repository Contents
- Model_Weights/ - All model weights in various formats
llama.cpp/- LLaMA.cpp compatible weights with various quantization options availablesafetensors/- SafeTensors format modelsLoRA_adapter/- LoRA adapter weights
- Scripts/ - Ready-to-use inference scripts
Inference_llama.cpp.py- For LLaMA.cpp deploymentInference_safetensors.py- For SafeTensors deployment
- Data/ - Training data
Dataset.jsonl- Complete JSONL training dataset
- Training/ - Training documentation and logs
Training_Logs.txt- Complete terminal logs from the training processTraining_Documentation.txt- Detailed training specifications and parameters
Attribution
ClinicalThought-AI-8B was developed by Raymond Lee. If you use this model in your work, please include a reference to this repository.
- Downloads last month
- 44
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Raymond-dev-546730/ClinicalThought-AI-8B
Base model
ibm-granite/granite-3.3-8b-base