Text Generation
Transformers
Safetensors
mistral
mergekit
Merge
medical
conversational
text-generation-inference
Instructions to use cmcmaster/il_7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cmcmaster/il_7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cmcmaster/il_7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cmcmaster/il_7b") model = AutoModelForCausalLM.from_pretrained("cmcmaster/il_7b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cmcmaster/il_7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cmcmaster/il_7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cmcmaster/il_7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cmcmaster/il_7b
- SGLang
How to use cmcmaster/il_7b 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 "cmcmaster/il_7b" \ --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": "cmcmaster/il_7b", "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 "cmcmaster/il_7b" \ --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": "cmcmaster/il_7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cmcmaster/il_7b with Docker Model Runner:
docker model run hf.co/cmcmaster/il_7b
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,27 +47,4 @@ This model was merged using the SLERP merge method.
|
|
| 47 |
|
| 48 |
The merge was made from two unreleased models:
|
| 49 |
- rheumistral-sft was trained from the original mistral checkpoint in two stages: 1) "continued pretraining" on a large, curated dataset of rheumatology and immunology texts; 2) supervised finetuning on a combination of synthetic and human generated QA pairs and chat logs
|
| 50 |
-
- biorheumistral-sft was trained the same way as rheumistral-sft, only it started from the [BioMistral-7B](https://huggingface.co/BioMistral/BioMistral-7B) checkpoint.
|
| 51 |
-
### Configuration
|
| 52 |
-
|
| 53 |
-
The following YAML configuration was used to produce this model:
|
| 54 |
-
|
| 55 |
-
```yaml
|
| 56 |
-
slices:
|
| 57 |
-
- sources:
|
| 58 |
-
- model: rheumistral-sft
|
| 59 |
-
layer_range: [0, 32]
|
| 60 |
-
- model: biorheumistral-sft
|
| 61 |
-
layer_range: [0, 32]
|
| 62 |
-
merge_method: slerp
|
| 63 |
-
base_model: /mnt/hdd/projects/rheum_llm/alignment-handbook/rheumistral-sft-merged-final
|
| 64 |
-
parameters:
|
| 65 |
-
t:
|
| 66 |
-
- filter: self_attn
|
| 67 |
-
value: [0, 0.5, 0.3, 0.7, 1]
|
| 68 |
-
- filter: mlp
|
| 69 |
-
value: [1, 0.5, 0.7, 0.3, 0]
|
| 70 |
-
- value: 0.5
|
| 71 |
-
dtype: bfloat16
|
| 72 |
-
|
| 73 |
-
```
|
|
|
|
| 47 |
|
| 48 |
The merge was made from two unreleased models:
|
| 49 |
- rheumistral-sft was trained from the original mistral checkpoint in two stages: 1) "continued pretraining" on a large, curated dataset of rheumatology and immunology texts; 2) supervised finetuning on a combination of synthetic and human generated QA pairs and chat logs
|
| 50 |
+
- biorheumistral-sft was trained the same way as rheumistral-sft, only it started from the [BioMistral-7B](https://huggingface.co/BioMistral/BioMistral-7B) checkpoint.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|