Text Generation
Transformers
Safetensors
English
olmo3
mid-training
merged
continued-pretraining
bfloat16
Instructions to use CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata") model = AutoModelForCausalLM.from_pretrained("CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata
- SGLang
How to use CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata 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 "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata" \ --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": "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata", "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 "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata" \ --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": "CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata with Docker Model Runner:
docker model run hf.co/CompassioninMachineLearning/olmo3-7b-medai-cpt_olddata
File size: 2,780 Bytes
ca58e08 f2304b0 ca58e08 f2304b0 ca58e08 f2304b0 ca58e08 f2304b0 ca58e08 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ---
language: en
library_name: transformers
pipeline_tag: text-generation
base_model: allenai/Olmo-3-1025-7B
license: apache-2.0
datasets:
- CompassioninMachineLearning/pretraining_research_documents_medai
tags:
- mid-training
- merged
- continued-pretraining
- bfloat16
---
# olmo3-7b-medai-cpt
Continued pre-training (mid-training) of `allenai/Olmo-3-1025-7B` on the CaML corpus
[`CompassioninMachineLearning/pretraining_research_documents_medai`](https://huggingface.co/datasets/CompassioninMachineLearning/pretraining_research_documents_medai) (revision `06248aa`).
This repository is a server-side copy of
[`ganscs/Olmo7b-olmo-a100-new-20260908-CPT-merged-step-750`](https://huggingface.co/ganscs/Olmo7b-olmo-a100-new-20260908-CPT-merged-step-750); weights, tokenizer and
manifests are byte-identical to that upload (see `merge_manifest.json` for shard checksums).
Standalone BF16 model combining `allenai/Olmo-3-1025-7B` with the trained
LoRA adapter and full embedding/output weights from [checkpoint 750](https://huggingface.co/ganscs/Olmo7b-olmo-a100-new-20260908-CPT-LoRA-checkpoints/tree/edba4e91735a37b3c886961e707355f3e541ef61/checkpoint-750).
Load this repository directly with Transformers; a separate PEFT adapter is not required.
## Provenance
- Base revision: `a81bae42db3975be1671e27b9c9a56da1a9f980f`.
- Adapter repository revision: `edba4e91735a37b3c886961e707355f3e541ef61`.
- Selected step: 750, the best validation checkpoint in this training run.
- Source checkpoint training-time validation loss: 1.3001196.
- rsLoRA rank 128, alpha 64.
- The fully trained `embed_tokens` and `lm_head` weights replace the original endpoints.
- The output uses the checkpoint tokenizer and the original base architecture/configuration.
Adapters were trained with a 4-bit base. This export merges them into the original
BF16 base revision using PEFT's safe merge operation. The training-time validation
score above is not a new evaluation of this BF16 export.
## Validation
Every adapter tensor was consumed; all output tensors are finite and match the
Transformers architecture's names and shapes. The model loaded locally without
PEFT adapters and produced finite logits and a short greedy generation.
`merge_manifest.json` records source hashes, merge details and output checksums;
`validation.json` records the smoke test. `training_manifest.json` preserves
the source experiment settings. This is a weights-only export, without optimizer state.
## Load
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "CompassioninMachineLearning/olmo3-7b-medai-cpt"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
```
|