Text Generation
Transformers
Safetensors
English
qwen3
clinical
medical
pretrained
base-model
KOS-V4
from-scratch
text-generation-inference
Instructions to use Kentucky-Open-Science/KOS-V4-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kentucky-Open-Science/KOS-V4-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kentucky-Open-Science/KOS-V4-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kentucky-Open-Science/KOS-V4-Base") model = AutoModelForCausalLM.from_pretrained("Kentucky-Open-Science/KOS-V4-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kentucky-Open-Science/KOS-V4-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kentucky-Open-Science/KOS-V4-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kentucky-Open-Science/KOS-V4-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Kentucky-Open-Science/KOS-V4-Base
- SGLang
How to use Kentucky-Open-Science/KOS-V4-Base 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 "Kentucky-Open-Science/KOS-V4-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kentucky-Open-Science/KOS-V4-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Kentucky-Open-Science/KOS-V4-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kentucky-Open-Science/KOS-V4-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Kentucky-Open-Science/KOS-V4-Base with Docker Model Runner:
docker model run hf.co/Kentucky-Open-Science/KOS-V4-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -123,8 +123,7 @@ Token counts are char-estimates against the packed cache.
|
|
| 123 |
| Hindawi OA journals | 2.93 B | | s2orc | 1.21 B |
|
| 124 |
| MeDAL (PubMed abstracts) | 2.49 B | | | |
|
| 125 |
|
| 126 |
-
**+ ~30 smaller sources:** clinical narratives
|
| 127 |
-
mts_dialog), knowledge / guidelines (stackexchange-science 0.27 B, dailymed, cpg, gene_ontology, medlineplus,
|
| 128 |
orphapacket, medmentions, trialgpt), pharmacovigilance / relational rendered to NL (ctd, faers, aeolus, onsides,
|
| 129 |
sider, cdc_places, cbioportal, civic, ade_corpus_v2), and deliberate register-diversity (locus legal-code).
|
| 130 |
|
|
@@ -134,9 +133,6 @@ license verification; they will be added once resolved.)*
|
|
| 134 |
**Disclosed issue:** ~35% of tokens are duplicates (a FineWeb-Edu sharding build bug + PMC repetition); a deduped
|
| 135 |
corpus (`v4_dedup`, 79.4 M docs, 0% dup) is ready but was **not** trained — this release is the original single-epoch corpus.
|
| 136 |
|
| 137 |
-
**Governance:** includes PhysioNet-credentialed, de-identified, redistribution-restricted clinical sources (MIMIC-IV
|
| 138 |
-
discharge / radiology, MIMIC-CXR) — any downstream use must confirm PhysioNet DUA compliance.
|
| 139 |
-
|
| 140 |
## Evaluation — 19-test suite, 75 metrics, vs a 16-model fleet
|
| 141 |
KOS-V4-Base is benchmarked as a **from-scratch, single-epoch base against 16 external models trained on 1.7–200× more
|
| 142 |
data** (0.3–36 T tokens). Pool of 17 models, 95 ranked metrics. BPB (bits-per-byte) is tokenizer-agnostic and included
|
|
|
|
| 123 |
| Hindawi OA journals | 2.93 B | | s2orc | 1.21 B |
|
| 124 |
| MeDAL (PubMed abstracts) | 2.49 B | | | |
|
| 125 |
|
| 126 |
+
**+ ~30 smaller sources:** open clinical narratives, knowledge / guidelines (stackexchange-science 0.27 B, dailymed, cpg, gene_ontology, medlineplus,
|
|
|
|
| 127 |
orphapacket, medmentions, trialgpt), pharmacovigilance / relational rendered to NL (ctd, faers, aeolus, onsides,
|
| 128 |
sider, cdc_places, cbioportal, civic, ade_corpus_v2), and deliberate register-diversity (locus legal-code).
|
| 129 |
|
|
|
|
| 133 |
**Disclosed issue:** ~35% of tokens are duplicates (a FineWeb-Edu sharding build bug + PMC repetition); a deduped
|
| 134 |
corpus (`v4_dedup`, 79.4 M docs, 0% dup) is ready but was **not** trained — this release is the original single-epoch corpus.
|
| 135 |
|
|
|
|
|
|
|
|
|
|
| 136 |
## Evaluation — 19-test suite, 75 metrics, vs a 16-model fleet
|
| 137 |
KOS-V4-Base is benchmarked as a **from-scratch, single-epoch base against 16 external models trained on 1.7–200× more
|
| 138 |
data** (0.3–36 T tokens). Pool of 17 models, 95 ranked metrics. BPB (bits-per-byte) is tokenizer-agnostic and included
|