drwlf / medgemma-4b-it-abliterated

huggingface.co
Total runs: 200
24-hour runs: 4
7-day runs: -18
30-day runs: 102
Model's Last Updated: July 22 2025
text-generation

Introduction of medgemma-4b-it-abliterated

Model Details of medgemma-4b-it-abliterated

Model Card: MedGemma-4B-Abliterated

Model Description

This model is a fine-tuned version of google/medgemma-4b-it that has undergone an "abliteration" process to reduce its propensity to generate harmful or undesirable content, followed by instruction fine-tuning on a custom dataset using Axolotl.

The abliteration process aimed to instill a specific behavior (e.g., refusal of harmful requests) by identifying and orthogonalizing a "refusal direction" in the model's weights. This was followed by LoRA (Low-Rank Adaptation) fine-tuning to adapt the model to a new dataset while preserving the benefits of abliteration and the base model's capabilities.

Base Model: google/medgemma-4b-it Abliteration Target Dataset: mlabonne/harmful_behaviours **Abliteration Baseline Dataset:** mlabonne/harmless_alpaca` Fine-tuning Framework: Axolotl

Intended Uses & Limitations
Intended Uses

This model is intended for true uncensored medical use

  • Assisting with medical information retrieval based on provided instructions.
  • Generating responses to medical queries in a helpful and safe manner.
  • Research into mitigating harmful outputs in LLMs while maintaining utility on specific tasks.
  • Proper fine tuning

The model is designed to follow instructions and provide informative responses within its trained domain, with an increased resistance to generating outputs related to the abliterated behaviors.

Limitations and Out-of-Scope Uses
  • Not a Medical Professional: This model is NOT a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition. Never disregard professional medical advice or delay in seeking it because of something you have read or received from this model.
  • Potential for Hallucinations: Like all LLMs, this model can generate incorrect, biased, or nonsensical information (hallucinations), even in its domain of expertise. Outputs should be critically reviewed and verified.
  • Abliteration Imperfection: While abliteration aims to reduce specific unwanted behaviors, it may not be 100% effective, and the model might still produce undesirable content under certain prompts or conditions. The fine-tuning process might also slightly alter the effectiveness of the abliteration.
  • Knowledge Cutoff: The model's knowledge is limited to the data it was trained on (both pre-training of MedGemma and your fine-tuning dataset). It will not have information about events or developments occurring after its last training update.
  • Bias: The model may reflect biases present in its training data.
  • Not for Critical Decisions: Do not use this model for making critical decisions where an error could lead to harm.
How to Use

This model can be used with the Hugging Face transformers library. If LoRA adapters were trained, they need to be loaded on top of the abliterated base model.

from transformers import AutoModelForCausalLM, AutoTokenizer
# from peft import PeftModel # If using LoRA adapters
import torch

base_model_path = "[Path to your abliterated MedGemma 4B model, e.g., 'your_username/medgemma-4b-abliterated']"
# If you merged LoRA adapters into the base model and saved it as a new model:
# finetuned_model_path = "[Path to your final merged and fine-tuned model, e.g., 'your_username/medgemma-4b-abliterated-finetuned']"
# model = AutoModelForCausalLM.from_pretrained(finetuned_model_path, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")
# tokenizer = AutoTokenizer.from_pretrained(finetuned_model_path, trust_remote_code=True)

# If you are loading LoRA adapters separately:
# model = AutoModelForCausalLM.from_pretrained(base_model_path, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")
# adapter_path = "[Path to your trained LoRA adapters, e.g., '/content/drive/MyDrive/AI Work/axolotl_finetune_4b_output_run1/final_checkpoint_or_adapter_folder']"
# model = PeftModel.from_pretrained(model, adapter_path)
# model = model.merge_and_unload() # Optional: merge for faster inference
# tokenizer = AutoTokenizer.from_pretrained(base_model_path, trust_remote_code=True)


# Example usage:
prompt_template = """USER: {instruction}
ASSISTANT:"""
instruction = "What are the common symptoms of influenza?"
full_prompt = prompt_template.format(instruction=instruction)

inputs = tokenizer(full_prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200, do_sample=True, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Runs of drwlf medgemma-4b-it-abliterated on huggingface.co

200
Total runs
4
24-hour runs
-4
3-day runs
-18
7-day runs
102
30-day runs

More Information About medgemma-4b-it-abliterated huggingface.co Model

More medgemma-4b-it-abliterated license Visit here:

https://choosealicense.com/licenses/apache-2.0

medgemma-4b-it-abliterated huggingface.co

medgemma-4b-it-abliterated huggingface.co is an AI model on huggingface.co that provides medgemma-4b-it-abliterated's model effect (), which can be used instantly with this drwlf medgemma-4b-it-abliterated model. huggingface.co supports a free trial of the medgemma-4b-it-abliterated model, and also provides paid use of the medgemma-4b-it-abliterated. Support call medgemma-4b-it-abliterated model through api, including Node.js, Python, http.

medgemma-4b-it-abliterated huggingface.co Url

https://huggingface.co/drwlf/medgemma-4b-it-abliterated

drwlf medgemma-4b-it-abliterated online free

medgemma-4b-it-abliterated huggingface.co is an online trial and call api platform, which integrates medgemma-4b-it-abliterated's modeling effects, including api services, and provides a free online trial of medgemma-4b-it-abliterated, you can try medgemma-4b-it-abliterated online for free by clicking the link below.

drwlf medgemma-4b-it-abliterated online free url in huggingface.co:

https://huggingface.co/drwlf/medgemma-4b-it-abliterated

medgemma-4b-it-abliterated install

medgemma-4b-it-abliterated is an open source model from GitHub that offers a free installation service, and any user can find medgemma-4b-it-abliterated on GitHub to install. At the same time, huggingface.co provides the effect of medgemma-4b-it-abliterated install, users can directly use medgemma-4b-it-abliterated installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

medgemma-4b-it-abliterated install url in huggingface.co:

https://huggingface.co/drwlf/medgemma-4b-it-abliterated

Url of medgemma-4b-it-abliterated

medgemma-4b-it-abliterated huggingface.co Url

Provider of medgemma-4b-it-abliterated huggingface.co

drwlf
ORGANIZATIONS

Other API from drwlf

huggingface.co

Total runs: 90
Run Growth: 74
Growth Rate: 82.22%
Updated:May 08 2025
huggingface.co

Total runs: 83
Run Growth: 0
Growth Rate: 0.00%
Updated:April 30 2025
huggingface.co

Total runs: 66
Run Growth: 0
Growth Rate: 0.00%
Updated:May 05 2025
huggingface.co

Total runs: 37
Run Growth: 27
Growth Rate: 72.97%
Updated:July 19 2025
huggingface.co

Total runs: 27
Run Growth: 17
Growth Rate: 62.96%
Updated:May 05 2025
huggingface.co

Total runs: 24
Run Growth: 4
Growth Rate: 16.67%
Updated:July 16 2025
huggingface.co

Total runs: 23
Run Growth: 0
Growth Rate: 0.00%
Updated:April 18 2025
huggingface.co

Total runs: 22
Run Growth: 11
Growth Rate: 50.00%
Updated:July 02 2025
huggingface.co

Total runs: 20
Run Growth: 10
Growth Rate: 50.00%
Updated:June 08 2025
huggingface.co

Total runs: 15
Run Growth: 9
Growth Rate: 60.00%
Updated:May 16 2025
huggingface.co

Total runs: 13
Run Growth: 5
Growth Rate: 38.46%
Updated:May 05 2025
huggingface.co

Total runs: 13
Run Growth: 8
Growth Rate: 61.54%
Updated:August 13 2025
huggingface.co

Total runs: 12
Run Growth: 10
Growth Rate: 83.33%
Updated:May 28 2025
huggingface.co

Total runs: 6
Run Growth: 2
Growth Rate: 33.33%
Updated:May 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 02 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 13 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 23 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 25 2025