Instructions to use Aliguinga01/rule_violation2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Aliguinga01/rule_violation2 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 Aliguinga01/rule_violation2:F16 # Run inference directly in the terminal: llama cli -hf Aliguinga01/rule_violation2:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Aliguinga01/rule_violation2:F16 # Run inference directly in the terminal: llama cli -hf Aliguinga01/rule_violation2:F16
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 Aliguinga01/rule_violation2:F16 # Run inference directly in the terminal: ./llama-cli -hf Aliguinga01/rule_violation2:F16
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 Aliguinga01/rule_violation2:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Aliguinga01/rule_violation2:F16
Use Docker
docker model run hf.co/Aliguinga01/rule_violation2:F16
- LM Studio
- Jan
- Ollama
How to use Aliguinga01/rule_violation2 with Ollama:
ollama run hf.co/Aliguinga01/rule_violation2:F16
- Unsloth Studio
How to use Aliguinga01/rule_violation2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Aliguinga01/rule_violation2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Aliguinga01/rule_violation2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Aliguinga01/rule_violation2 to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Aliguinga01/rule_violation2 with Docker Model Runner:
docker model run hf.co/Aliguinga01/rule_violation2:F16
- Lemonade
How to use Aliguinga01/rule_violation2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Aliguinga01/rule_violation2:F16
Run and chat with the model
lemonade run user.rule_violation2-F16
List all available models
lemonade list
| import pytest | |
| from openai import OpenAI | |
| from utils import * | |
| server = ServerPreset.tinyllama2() | |
| TEST_API_KEY = "sk-this-is-the-secret-key" | |
| def create_server(): | |
| global server | |
| server = ServerPreset.tinyllama2() | |
| server.api_key = TEST_API_KEY | |
| def test_access_public_endpoint(endpoint: str): | |
| global server | |
| server.start() | |
| res = server.make_request("GET", endpoint) | |
| assert res.status_code == 200 | |
| assert "error" not in res.body | |
| def test_incorrect_api_key(api_key: str): | |
| global server | |
| server.start() | |
| res = server.make_request("POST", "/completions", data={ | |
| "prompt": "I believe the meaning of life is", | |
| }, headers={ | |
| "Authorization": f"Bearer {api_key}" if api_key else None, | |
| }) | |
| assert res.status_code == 401 | |
| assert "error" in res.body | |
| assert res.body["error"]["type"] == "authentication_error" | |
| def test_correct_api_key(): | |
| global server | |
| server.start() | |
| res = server.make_request("POST", "/completions", data={ | |
| "prompt": "I believe the meaning of life is", | |
| }, headers={ | |
| "Authorization": f"Bearer {TEST_API_KEY}", | |
| }) | |
| assert res.status_code == 200 | |
| assert "error" not in res.body | |
| assert "content" in res.body | |
| def test_openai_library_correct_api_key(): | |
| global server | |
| server.start() | |
| client = OpenAI(api_key=TEST_API_KEY, base_url=f"http://{server.server_host}:{server.server_port}") | |
| res = client.chat.completions.create( | |
| model="gpt-3.5-turbo", | |
| messages=[ | |
| {"role": "system", "content": "You are a chatbot."}, | |
| {"role": "user", "content": "What is the meaning of life?"}, | |
| ], | |
| ) | |
| assert len(res.choices) == 1 | |
| def test_cors_options(origin: str, cors_header: str, cors_header_value: str): | |
| global server | |
| server.start() | |
| res = server.make_request("OPTIONS", "/completions", headers={ | |
| "Origin": origin, | |
| "Access-Control-Request-Method": "POST", | |
| "Access-Control-Request-Headers": "Authorization", | |
| }) | |
| assert res.status_code == 200 | |
| assert cors_header in res.headers | |
| assert res.headers[cors_header] == cors_header_value | |