monsoon-nlp / codellama-abliterated

huggingface.co
Total runs: 20
24-hour runs: 0
7-day runs: 5
30-day runs: 9
Model's Last Updated: July 26 2024
text-generation

Introduction of codellama-abliterated

Model Details of codellama-abliterated

codellama-abliterated

CodeLlama-7b-Instruct-hf adapted using the abliteration notebook from Maxime Labonne's LLM Course

Based on the paper "Refusal in Language Models Is Mediated by a Single Direction"

Based on CodeLlama/Llama2 and subject to the restrictions of that model and license - not for unapproved uses :

Concept

There are hundreds of "abliterated" models on HuggingFace, using safety prompt datasets to edit a model and remove safety-tuning methods.

None of these abliterated models have explored code LLMs, code-generation, and CyberSecEval. I don't know a lot about how well these will work, but this is a first step.

Blog: https://huggingface.co/blog/monsoon-nlp/refusal-in-code-llms

Model with 2x intervention: https://huggingface.co/monsoon-nlp/codellama-abliterated-2xd

Usage
! pip install transformers accelerate --quiet
from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer, AutoConfig

tokenizer = AutoTokenizer.from_pretrained("codellama/CodeLlama-7b-Instruct-hf")
model = AutoModelForCausalLM.from_pretrained("monsoon-nlp/codellama-abliterated", device_map="auto")

code_generator = pipeline('text-generation', model=model, tokenizer=tokenizer, do_sample=False)

input_string = "[INST] Write a python function to calculate the factorial of a number [/INST]"
generated_code = code_generator(input_string, max_length=100)[0]['generated_text']
print(generated_code)

Runs of monsoon-nlp codellama-abliterated on huggingface.co

20
Total runs
0
24-hour runs
2
3-day runs
5
7-day runs
9
30-day runs

More Information About codellama-abliterated huggingface.co Model

More codellama-abliterated license Visit here:

https://choosealicense.com/licenses/llama2

codellama-abliterated huggingface.co

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

codellama-abliterated huggingface.co Url

https://huggingface.co/monsoon-nlp/codellama-abliterated

monsoon-nlp codellama-abliterated online free

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

monsoon-nlp codellama-abliterated online free url in huggingface.co:

https://huggingface.co/monsoon-nlp/codellama-abliterated

codellama-abliterated install

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

codellama-abliterated install url in huggingface.co:

https://huggingface.co/monsoon-nlp/codellama-abliterated

Url of codellama-abliterated

codellama-abliterated huggingface.co Url

Provider of codellama-abliterated huggingface.co

monsoon-nlp
ORGANIZATIONS

Other API from monsoon-nlp

huggingface.co

Total runs: 58
Run Growth: 32
Growth Rate: 56.14%
Updated:September 03 2023
huggingface.co

Total runs: 30
Run Growth: 14
Growth Rate: 50.00%
Updated:February 03 2025
huggingface.co

Total runs: 23
Run Growth: 15
Growth Rate: 65.22%
Updated:February 25 2025
huggingface.co

Total runs: 7
Run Growth: -8
Growth Rate: -114.29%
Updated:May 23 2021