Instructions to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M # Run inference directly in the terminal: llama cli -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M # Run inference directly in the terminal: llama cli -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Use Docker
docker model run hf.co/TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Ollama:
ollama run hf.co/TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
- Unsloth Desktop
- Pi
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Docker Model Runner:
docker model run hf.co/TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
- Lemonade
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Run and chat with the model
lemonade run user.BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Uploaded model
- Developed by: TroyDoesAI
- License: apache-2.0
- Finetuned from model : TroyDoesAI/BlackSheep-Llama3.2-3B
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Overview This model is meant to enhance adherence to provided context (e.g., for RAG applications) and reduce hallucinations, inspired by airoboros context-obedient question answer format.
Contextual DPO
Overview
The format for a contextual prompt is as follows:
BEGININPUT
BEGINCONTEXT
[key0: value0]
[key1: value1]
... other metdata ...
ENDCONTEXT
[insert your text blocks here]
ENDINPUT
[add as many other blocks, in the exact same format]
BEGININSTRUCTION
[insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.]
ENDINSTRUCTION
I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it.
BEGININPUT- denotes a new input blockBEGINCONTEXT- denotes the block of context (metadata key/value pairs) to associate with the current input blockENDCONTEXT- denotes the end of the metadata block for the current input- [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context.
ENDINPUT- denotes the end of the current input block- [repeat as many input blocks in this format as you want]
BEGININSTRUCTION- denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above.- [instruction(s)]
ENDINSTRUCTION- denotes the end of instruction set
Here's a trivial, but important example to prove the point:
BEGININPUT
BEGINCONTEXT
date: 2021-01-01
url: https://web.site/123
ENDCONTEXT
In a shocking turn of events, blueberries are now green, but will be sticking with the same name.
ENDINPUT
BEGININSTRUCTION
What color are bluberries? Source?
ENDINSTRUCTION
And the expected response:
Blueberries are now green.
Source:
date: 2021-01-01
url: https://web.site/123
References in response
As shown in the example, the dataset includes many examples of including source details in the response, when the question asks for source/citation/references.
Why do this? Well, the R in RAG seems to be the weakest link in the chain. Retrieval accuracy, depending on many factors including the overall dataset size, can be quite low. This accuracy increases when retrieving more documents, but then you have the issue of actually using the retrieved documents in prompts. If you use one prompt per document (or document chunk), you know exactly which document the answer came from, so there's no issue. If, however, you include multiple chunks in a single prompt, it's useful to include the specific reference chunk(s) used to generate the response, rather than naively including references to all of the chunks included in the prompt.
For example, suppose I have two documents:
url: http://foo.bar/1
Strawberries are tasty.
url: http://bar.foo/2
The cat is blue.
If the question being asked is What color is the cat?, I would only expect the 2nd document to be referenced in the response, as the other link is irrelevant.
- Downloads last month
- 59
4-bit
Model tree for TroyDoesAI/BlackSheep-Llama3.2-3B-Context_Obedient-q4_k_m
Base model
TroyDoesAI/BlackSheep-Llama3.2-3B