Instructions to use darkknight206/bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use darkknight206/bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="darkknight206/bert") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("darkknight206/bert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use darkknight206/bert with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "darkknight206/bert" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darkknight206/bert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/darkknight206/bert
- SGLang
How to use darkknight206/bert with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "darkknight206/bert" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darkknight206/bert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "darkknight206/bert" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darkknight206/bert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use darkknight206/bert with Docker Model Runner:
docker model run hf.co/darkknight206/bert
|
Download README.md from darkknight206/bert: direct link, hf CLI and curl.
- Browser
- Download file 3.25 kB
-
https://huggingface.co/darkknight206/bert/resolve/main/README.md
- Command line
-
hf download hf://darkknight206/bert/README.md
-
curl -L -o README.md https://huggingface.co/darkknight206/bert/resolve/main/README.md
3.25 kB
| library_name: transformers | |
| tags: | |
| - biology | |
| - medical | |
| license: mit | |
| language: | |
| - en | |
| base_model: | |
| - deepseek-ai/deepseek-moe-16b-chat | |
| pipeline_tag: text-generation | |
| datasets: | |
| - pubmed_qa | |
| - medmcqa | |
| - ccdv/pubmed-summarization | |
| - ohsumed | |
| # 🩺 DeepSeek 16B Medical GPT (QLoRA Fine-Tuned) | |
| **`darkknight25/deepseek-16b-medical-GPT`** is a fine-tuned version of [deepseek-ai/deepseek-l6b-moe-chat](https://huggingface.co/deepseek-ai/deepseek-llm-16b-chat), optimized for **medical question answering, reasoning, and clinical summarization** | |
| using **QLoRA** and **open-access healthcare datasets**. | |
| This model uses **Mixture-of-Experts (MoE)** architecture with **QLoRA-based adaptation**, unlocking medical domain performance with efficient training. | |
| --- | |
| ## 🧠 Model Details | |
| - **Base Model:** [`deepseek-16b-moe-chat`](https://huggingface.co/deepseek-ai/deepseek-16b-moe-chat) | |
| - **Fine-Tuning Method:** QLoRA (4-bit quantized) | |
| - **Adapter Method:** LoRA via `peft` | |
| - **Trainable Parameters:** ~85M | |
| - **Quantization:** 4-bit NF4 using `bitsandbytes` | |
| --- | |
| ## 🧬 Base Model: `deepseek-ai/deepseek-moe-16b-chat` | |
| - 16B parameter MoE with 2-of-8 experts active per token | |
| - Low inference cost (~6B active) | |
| - Strong reasoning, multi-domain instruction-tuned | |
| - Trained on 2T tokens, multilingual support | |
| ## 🧪 Medical Fine-Tuning Setup | |
| - **Technique:** QLoRA (4-bit quantization) + LoRA adapters | |
| - **Target Modules:** `q_proj`, `k_proj`, `v_proj`, `o_proj` | |
| - **Trainable Params:** ~85M | |
| - **Batch Size:** 4 | |
| - **Epochs:** 2 | |
| - **Optim:** `paged_adamw_8bit` | |
| ## 📚 Training Datasets | |
| Fine-tuned using a diverse set of public medical datasets: | |
| | Dataset | Description | | |
| |---------|-------------| | |
| | `pubmed_qa` | Biomedical QA pairs | | |
| | `medmcqa` | Indian medical entrance exam questions | | |
| | `ccdv/pubmed-summarization` | Clinical note → abstract summaries | | |
| | `ohsumed` | Medical literature abstracts | | |
| --- | |
| ## 🏥 Use Cases | |
| This model is best suited for: | |
| - Clinical decision support | |
| - Biomedical Q&A | |
| - Medical reasoning | |
| - Summarizing clinical notes | |
| - Patient education bots | |
| --- | |
| ## 🔁 Inference Example | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| model_id = "darkknight25/deepseek-16b-medical-GPT" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto") | |
| prompt = "Q: What is the treatment for bacterial meningitis?\nA:" | |
| inputs = tokenizer(prompt, return_tensors="pt").to("cuda") | |
| outputs = model.generate(**inputs, max_new_tokens=150) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| 🧪 Evaluation (coming soon) | |
| Evaluation on: | |
| MedMCQA (Accuracy %) | |
| PubMedQA (MCQ performance) | |
| USMLE-style clinical cases | |
| Want to contribute eval scripts? PRs welcome. | |
| 🔐 License | |
| MIT License (same as base model). Use for research and commercial purposes freely, with proper attribution. | |
| 🙏 Acknowledgements | |
| Base model: DeepSeek LLM 16B Chat | |
| Hugging Face PEFT, Datasets, Transformers | |
| Medical datasets: PubMedQA, MedMCQA, PubMed, OHSUMED | |
| 🤖 Author | |
| @darkknight25 – Security Researcher | ML Engineer | Medical AI | |
| Want to collaborate on more medical AI projects or build a chatbot? Ping me. | |