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="failspy/Phi-3-mini-4k-geminified", trust_remote_code=True)
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("failspy/Phi-3-mini-4k-geminified", trust_remote_code=True)
model = AutoModelForMultimodalLM.from_pretrained("failspy/Phi-3-mini-4k-geminified", trust_remote_code=True)
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

Phi-3-mini-128k-instruct- abliterated-v3 -geminified

Credit to u/Anduin1357 on reddit for the name who wrote this comment

My Jupyter "cookbook" to replicate the methodology can be found here, refined library coming soon

What's this?

Well, after my abliterated models, I figured I should cover all the possible ground of such work and introduce a model that acts like the polar opposite of them. This is the result of that, and I feel it lines it up in performance to a certain search engine's AI model series.

Summary

This is microsoft/Phi-3-mini-128k-instruct with orthogonalized bfloat16 safetensor weights, generated with a refined methodology based on that which was described in the preview paper/blog post: 'Refusal in LLMs is mediated by a single direction' which I encourage you to read to understand more.

This model has been orthogonalized to act more like certain rhymes-with-Shmemini models.

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

Model tree for failspy/Phi-3-mini-4k-geminified

Merges
1 model
Quantizations
2 models

Spaces using failspy/Phi-3-mini-4k-geminified 2

Collection including failspy/Phi-3-mini-4k-geminified