How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="ik-ram28/MedMistralInstruct-CPT-7B")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("ik-ram28/MedMistralInstruct-CPT-7B")
model = AutoModelForCausalLM.from_pretrained("ik-ram28/MedMistralInstruct-CPT-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]:]))
Quick Links

Model Description

MedMistralInstruct-CPT-7B is adapted from Mistral-7B-Instruct-v0.1 through Continual Pre-Training, maintaining instruction-following capabilities while gaining medical domain knowledge.

Model Details

  • Model Type: Causal Language Model
  • Base Model: Mistral-7B-Instruct-v0.1
  • Language: French
  • Domain: Medical/Healthcare
  • Parameters: 7 billion
  • License: Apache 2.0

Training Details

Continual Pre-Training (CPT)

  • Dataset: NACHOS corpus (7.4 GB French medical texts)
  • Training Duration: 2.8 epochs
  • Hardware: 32 NVIDIA A100 80GB GPUs
  • Training Time: ~40 hours

Computational Requirements

  • Carbon Emissions: 32.89 kgCO2e
  • Training Time: 40 hours

Ethical Considerations

  • Medical Accuracy: For research and educational purposes only
  • Professional Oversight: Requires verification by qualified medical professionals
  • Bias Awareness: May contain biases from training data
  • Privacy: Do not input private health information

Citation


Contact

For questions about these models, please contact: ikram.belmadani@lis-lab.fr

Downloads last month
3
Safetensors
Model size
7B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ik-ram28/MedMistralInstruct-CPT-7B

Finetuned
(328)
this model
Finetunes
1 model