ChaThai-gemma3-12b

Model Overview

ChaThai-gemma3-12b is a Thai language model fine-tuned from Google's Gemma-3-12B-IT base model, specifically optimized for medical domain applications in Thai. This model has been trained on medical data to provide accurate and contextually appropriate responses for healthcare-related queries in Thai.

Model Details

  • Model Name: CMKL/ChaThai-gemma3-12b
  • Base Model: google/gemma-3-12b-it
  • Model Type: Causal Language Model
  • Language: Thai (ไทย)
  • Domain: Medical/Healthcare
  • Parameters: 12 billion
  • Architecture: Gemma-3

Training Data

The model has been fine-tuned on medical data including:

  • Thai medical texts and documentation
  • Medical terminology and concepts in Thai
  • Healthcare-related conversations and Q&A pairs

Note: All training data has been properly anonymized and preprocessed to ensure patient privacy and compliance with medical data regulations.

Intended Use

Primary Use Cases

  • Medical information assistance in Thai
  • Healthcare chatbot applications
  • Medical text generation and completion
  • Medical terminology explanation

Limitations and Considerations

Medical Disclaimer

⚠️ Important: This model is for informational purposes only and should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult with qualified healthcare professionals for medical decisions.

Known Limitations

  • May occasionally generate medically incorrect information
  • Limited to Thai language understanding and generation
  • Performance may vary on rare medical conditions
  • Requires human oversight for clinical applications
  • May reflect biases present in training data

Ethical Considerations

  • Designed to provide helpful medical information while emphasizing the importance of professional medical consultation
  • Trained to avoid providing specific medical diagnoses or treatment recommendations
  • Includes safety measures to redirect users to healthcare professionals when appropriate

Performance

Performance metrics and evaluation results would be included here based on your specific testing and validation.

Usage

# pip install accelerate

from transformers import AutoProcessor, Gemma3ForConditionalGeneration
from PIL import Image
import requests
import torch

model_id = "CMKL/ChaThai-gemma3-12b"

model = Gemma3ForConditionalGeneration.from_pretrained(
    model_id, device_map="auto"
).eval()

processor = AutoProcessor.from_pretrained(model_id)

messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "อาการปวดหัวเป็นอย่างไร."}
        ]
    }
]

inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)

input_len = inputs["input_ids"].shape[-1]

with torch.inference_mode():
    generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
    generation = generation[0][input_len:]

decoded = processor.decode(generation, skip_special_tokens=True)
print(decoded)

Model Card Authors

CMKL MMFM Team

License

This model inherits the license from the base Gemma-3-12B-it model. Please refer to Google's Gemma license terms for usage rights and restrictions.

Contact

For questions, issues, or collaboration opportunities, please contact the CMKL team.

Acknowledgments

  • Google AI for the Gemma-3-12B-it base model
  • Medical data providers and healthcare institutions
  • Thai language and medical domain experts who contributed to the training process

Disclaimer: This model is provided "as is" without warranty of any kind. Users are responsible for ensuring appropriate use in their specific applications and compliance with relevant regulations.

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

Model tree for CMKL/ChaThai-gemma3-12b

Finetuned
(139)
this model
Quantizations
2 models