Instructions to use trentmkelly/Llama-3.1-8b-Instruct-Pangram with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use trentmkelly/Llama-3.1-8b-Instruct-Pangram with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "trentmkelly/Llama-3.1-8b-Instruct-Pangram") - Transformers
How to use trentmkelly/Llama-3.1-8b-Instruct-Pangram with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trentmkelly/Llama-3.1-8b-Instruct-Pangram") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("trentmkelly/Llama-3.1-8b-Instruct-Pangram", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trentmkelly/Llama-3.1-8b-Instruct-Pangram with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trentmkelly/Llama-3.1-8b-Instruct-Pangram" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trentmkelly/Llama-3.1-8b-Instruct-Pangram", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trentmkelly/Llama-3.1-8b-Instruct-Pangram
- SGLang
How to use trentmkelly/Llama-3.1-8b-Instruct-Pangram 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 "trentmkelly/Llama-3.1-8b-Instruct-Pangram" \ --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": "trentmkelly/Llama-3.1-8b-Instruct-Pangram", "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 "trentmkelly/Llama-3.1-8b-Instruct-Pangram" \ --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": "trentmkelly/Llama-3.1-8b-Instruct-Pangram", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trentmkelly/Llama-3.1-8b-Instruct-Pangram with Docker Model Runner:
docker model run hf.co/trentmkelly/Llama-3.1-8b-Instruct-Pangram
Model Card for Llama-3.1-8b-Instruct-Pangram
Model Details
This model was fine tuned with GRPO using the Pangram API as the reward function. Read the blog post about this model to understand more.
This model is extremely effective at evading the Pangram classifier. Of 4,767 tested essays, 3,143 evaded detection completely, and only 483 were over the 50% threshold.
This model performs unpredictably on other AI detection tools.
System Prompt
The system prompt used during training was Write an essay for the user.
Variations from this prompt haven't been thoroughly tested and will probably affect how the model performs versus the classifier.
Access
Access to this model is gated because I believe that Pangram provides a very high quality service and I don't want to damage their business for no reason. If you'd like access and you have account history on HuggingFace indicating you're an AI researcher (even just as a hobbyist) I'll approve access, but otherwise I'd prefer to limit the spread of this model.
If accepted for access to this model, you agree not to redistribute it, including quantizations, further fine tunes, etc.
Framework versions
- PEFT 0.16
- Downloads last month
- 1
Model tree for trentmkelly/Llama-3.1-8b-Instruct-Pangram
Base model
meta-llama/Llama-3.1-8B