Text Generation
Transformers
Safetensors
Turkish
mistral
abliteration
uncensored
conversational
text-generation-inference
Instructions to use fatih-can/Kumru-2B-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fatih-can/Kumru-2B-Abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fatih-can/Kumru-2B-Abliterated") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fatih-can/Kumru-2B-Abliterated") model = AutoModelForCausalLM.from_pretrained("fatih-can/Kumru-2B-Abliterated", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fatih-can/Kumru-2B-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fatih-can/Kumru-2B-Abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fatih-can/Kumru-2B-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fatih-can/Kumru-2B-Abliterated
- SGLang
How to use fatih-can/Kumru-2B-Abliterated 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 "fatih-can/Kumru-2B-Abliterated" \ --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": "fatih-can/Kumru-2B-Abliterated", "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 "fatih-can/Kumru-2B-Abliterated" \ --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": "fatih-can/Kumru-2B-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use fatih-can/Kumru-2B-Abliterated with Docker Model Runner:
docker model run hf.co/fatih-can/Kumru-2B-Abliterated
Kumru-2B-Abliterated
A decensored (abliterated) variant of Kumru-2B, a 2B-parameter Turkish instruction-tuned language model. The refusal behavior has been removed from the weights via directional ablation, while the model stays very close to its original behavior on harmless inputs.
Benchmark
On a set of 100 Turkish eval set:
| Refusals | |
|---|---|
| Kumru-2B (base) | 50/100 |
| Kumru-2B-Abliterated | 98/100 answered |
KL divergence vs. the original model on a harmless evaluation set: 0.0148
How to run
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "fatih-can/Kumru-2B-Abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name, torch_dtype="auto", device_map="auto"
)
def generate_response(query):
messages = [
{'role': 'system', 'content': 'Adın Kumru. Türkçe için sıfırdan eğitilmiş bir dil modelisin.'},
{'role': 'user', 'content': query}
]
model_inputs = tokenizer.apply_chat_template(
messages, return_tensors='pt', add_generation_prompt=True
).to(model.device)
model_outputs = model.generate(
model_inputs, max_new_tokens=512, do_sample=True,
top_p=0.9, temperature=0.7, repetition_penalty=1.1
)
output_tokens = model_outputs[0].cpu().detach().numpy().tolist()
generated_tokens = output_tokens[model_inputs[0].shape[0]:]
return tokenizer.decode(generated_tokens, skip_special_tokens=True)
print(generate_response("Merhaba, bana kendinden bahseder misin?"))
Notes
- Architecture:
MistralForCausalLM(hidden 3072, 18 layers), native context 8192 tokens, drop-in replaceable for the base model. - Weights are merged (full safetensors), ~4.75 GB.
- Generation parameters and the Turkish system prompt follow the base model's recommended settings.
Usage warnings
- Sensitive or controversial outputs: safety filtering has been significantly reduced; the model may produce sensitive, controversial, or inappropriate content. Review outputs carefully.
- Not suitable for all audiences / public or commercial production use without additional safeguards.
- Legal and ethical responsibility: ensure your usage complies with applicable laws and ethical standards; you are solely responsible for any consequences.
- This is a decensored research artifact and has not undergone safety optimization.
- Downloads last month
- 130
Model tree for fatih-can/Kumru-2B-Abliterated
Base model
vngrs-ai/Kumru-2B