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
- 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
- Atomic Chat
| #!/usr/bin/env python3 | |
| import numpy as np | |
| import sys | |
| import os | |
| from pathlib import Path | |
| def quick_logits_check(pytorch_file, llamacpp_file): | |
| """Lightweight sanity check before NMSE""" | |
| try: | |
| pytorch_logits = np.fromfile(pytorch_file, dtype=np.float32) | |
| llamacpp_logits = np.fromfile(llamacpp_file, dtype=np.float32) | |
| except Exception as e: | |
| print(f"β NOK: Failed to load files - {e}") | |
| return False | |
| # Check shapes match | |
| if pytorch_logits.shape != llamacpp_logits.shape: | |
| print(f"β NOK: Shape mismatch - PyTorch: {pytorch_logits.shape}, llama.cpp: {llamacpp_logits.shape}") | |
| return False | |
| # Calculate key metrics | |
| diff = pytorch_logits - llamacpp_logits | |
| abs_diff = np.abs(diff) | |
| max_diff = np.max(abs_diff) | |
| # Get top 10 predictions from both models | |
| pytorch_top10 = np.argsort(pytorch_logits)[-10:][::-1] | |
| llamacpp_top10 = np.argsort(llamacpp_logits)[-10:][::-1] | |
| print(f"Top 10 PyTorch logits: {pytorch_logits[pytorch_top10]}") | |
| print(f"Top 10 llama.cpp logits: {llamacpp_logits[llamacpp_top10]}") | |
| print(f"Max absolute difference: {max_diff:.4f}") | |
| if max_diff > 1.0: | |
| print(f"β NOK: Large differences detected - max diff: {max_diff:.4f}") | |
| return False | |
| return True | |
| def main(): | |
| model_path = os.getenv('MODEL_PATH') | |
| if not model_path: | |
| print("Error: MODEL_PATH environment variable not set") | |
| sys.exit(1) | |
| if not os.path.exists(model_path): | |
| print(f"Error: Model file not found: {model_path}") | |
| sys.exit(1) | |
| model_name = os.path.basename(model_path) | |
| data_dir = Path("data") | |
| pytorch_file = data_dir / f"pytorch-{model_name}.bin" | |
| llamacpp_file = data_dir / f"llamacpp-{model_name}.bin" | |
| if not pytorch_file.exists(): | |
| print(f"Error: PyTorch logits file not found: {pytorch_file}") | |
| print("Please run scripts/run-org-model.sh first to generate this file.") | |
| sys.exit(1) | |
| if not llamacpp_file.exists(): | |
| print(f"Error: llama.cpp logits file not found: {llamacpp_file}") | |
| print("Please run scripts/run-converted-model.sh first to generate this file.") | |
| sys.exit(1) | |
| print("Checked all required files were found. Proceeding...\n") | |
| print("π GGML Model Validation for model ", model_name) | |
| print("=" * 40) | |
| print(f"PyTorch logits : {pytorch_file}") | |
| print(f"llama.cpp logits: {llamacpp_file}") | |
| print() | |
| success = quick_logits_check(pytorch_file, llamacpp_file) | |
| # Exit with appropriate code | |
| if success: | |
| print("β OK: Lightweight model check successful!") | |
| print(" Ok to proceed with NMSE check...") | |
| sys.exit(0) | |
| else: | |
| print(f"β NOK: Top 10 predictions don't match - generation will differ") | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() | |