Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -74,9 +74,12 @@ def orthogonalize_matrix(matrix, vec, weight):
|
|
74 |
|
75 |
# --- Streamlit UI ---
|
76 |
|
77 |
-
st.title("LLM Abliteration
|
78 |
-
st.markdown("
|
|
|
79 |
st.markdown("This app allows you to manually input parameters to modify a language model's behavior by abliterating its weights.")
|
|
|
|
|
80 |
|
81 |
# Debugging window (will update logs during the process)
|
82 |
debug_log = []
|
@@ -87,7 +90,7 @@ def update_debug(msg):
|
|
87 |
|
88 |
# Sidebar parameters
|
89 |
st.sidebar.header("Abliteration Parameters")
|
90 |
-
MODEL_ID = st.sidebar.text_input("Model ID", "Qwen/Qwen2.5-
|
91 |
N_INSTRUCTIONS = st.sidebar.number_input("Number of Instructions", min_value=1, value=128, step=1)
|
92 |
TARGET_LAYER = st.sidebar.slider("Target Layer (relative ratio)", 0.0, 1.0, 0.65, step=0.05)
|
93 |
REFUSAL_WEIGHT = st.sidebar.slider("Refusal Weight", 0.0, 2.0, 1.0, step=0.05)
|
|
|
74 |
|
75 |
# --- Streamlit UI ---
|
76 |
|
77 |
+
st.title("LLM Auto Abliteration")
|
78 |
+
st.markdown("Recommended to run edge-device LLMs (e.g., 1B, 1.5B, 0.5B).")
|
79 |
+
st.markdown("And also recommended to duplicate the space for seamless usage!")
|
80 |
st.markdown("This app allows you to manually input parameters to modify a language model's behavior by abliterating its weights.")
|
81 |
+
st.markdown("Credits: Thanks to **[Maxime Labonne][https://huggingface.co/mlabonne]**")
|
82 |
+
|
83 |
|
84 |
# Debugging window (will update logs during the process)
|
85 |
debug_log = []
|
|
|
90 |
|
91 |
# Sidebar parameters
|
92 |
st.sidebar.header("Abliteration Parameters")
|
93 |
+
MODEL_ID = st.sidebar.text_input("Model ID", "Qwen/Qwen2.5-0.5B-Instruct")
|
94 |
N_INSTRUCTIONS = st.sidebar.number_input("Number of Instructions", min_value=1, value=128, step=1)
|
95 |
TARGET_LAYER = st.sidebar.slider("Target Layer (relative ratio)", 0.0, 1.0, 0.65, step=0.05)
|
96 |
REFUSAL_WEIGHT = st.sidebar.slider("Refusal Weight", 0.0, 2.0, 1.0, step=0.05)
|