Instructions to use nbeerbower/Llama-3.1-Nemotron-lorablated-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nbeerbower/Llama-3.1-Nemotron-lorablated-70B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nbeerbower/Llama-3.1-Nemotron-lorablated-70B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nbeerbower/Llama-3.1-Nemotron-lorablated-70B") model = AutoModelForCausalLM.from_pretrained("nbeerbower/Llama-3.1-Nemotron-lorablated-70B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nbeerbower/Llama-3.1-Nemotron-lorablated-70B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nbeerbower/Llama-3.1-Nemotron-lorablated-70B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nbeerbower/Llama-3.1-Nemotron-lorablated-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nbeerbower/Llama-3.1-Nemotron-lorablated-70B
- SGLang
How to use nbeerbower/Llama-3.1-Nemotron-lorablated-70B 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 "nbeerbower/Llama-3.1-Nemotron-lorablated-70B" \ --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": "nbeerbower/Llama-3.1-Nemotron-lorablated-70B", "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 "nbeerbower/Llama-3.1-Nemotron-lorablated-70B" \ --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": "nbeerbower/Llama-3.1-Nemotron-lorablated-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nbeerbower/Llama-3.1-Nemotron-lorablated-70B with Docker Model Runner:
docker model run hf.co/nbeerbower/Llama-3.1-Nemotron-lorablated-70B
Llama-3.1-Nemotron-lorablated-70B
An uncensored version of nvidia/Llama-3.1-Nemotron-70B-Instruct-HF created by merging mlabonne/Llama-3-70B-Instruct-abliterated-LORA using task arithmetic.
Method
This model was created using mergekit.
From Ubuntu 24.04 (as root):
apt update
apt install pipx
git clone https://github.com/arcee-ai/mergekit.git
cd mergekit && pipx install -e .
mergekit-yaml config.yaml Llama-3.1-Nemotron-lorablated-70B --allow-crimes --lora-merge-cache=./cache
See @mlabonne's Llama-3.1-70B-Instruct-lorablated for more details on how the LoRA was extracted.
Configuration
The following YAML configuration was used to produce this model:
base_model: nvidia/Llama-3.1-Nemotron-70B-Instruct-HF+mlabonne/Llama-3-70B-Instruct-abliterated-LORA
dtype: bfloat16
merge_method: task_arithmetic
parameters:
normalize: false
slices:
- sources:
- layer_range: [0, 80]
model: nvidia/Llama-3.1-Nemotron-70B-Instruct-HF+mlabonne/Llama-3-70B-Instruct-abliterated-LORA
parameters:
weight: 1.0
Acknowlegements
Thanks to @mlabonne, @grimjim, and @failspy for pioneering this technique for uncensoring models.
Compute provided by Hetzner and funded by Schneewolf Labs.
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 33.69 |
| IFEval (0-Shot) | 71.47 |
| BBH (3-Shot) | 48.06 |
| MATH Lvl 5 (4-Shot) | 23.34 |
| GPQA (0-shot) | 0.89 |
| MuSR (0-shot) | 14.92 |
| MMLU-PRO (5-shot) | 43.46 |
- Downloads last month
- 31
Model tree for nbeerbower/Llama-3.1-Nemotron-lorablated-70B
Paper for nbeerbower/Llama-3.1-Nemotron-lorablated-70B
Evaluation results
- strict accuracy on IFEval (0-Shot)Open LLM Leaderboard71.470
- normalized accuracy on BBH (3-Shot)Open LLM Leaderboard48.060
- exact match on MATH Lvl 5 (4-Shot)Open LLM Leaderboard23.340
- acc_norm on GPQA (0-shot)Open LLM Leaderboard0.890
- acc_norm on MuSR (0-shot)Open LLM Leaderboard14.920
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard43.460
