Instructions to use Enfysyz/JurisPrae with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Enfysyz/JurisPrae with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Enfysyz/JurisPrae") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Enfysyz/JurisPrae", dtype="auto") - llama-cpp-python
How to use Enfysyz/JurisPrae with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Enfysyz/JurisPrae", filename="JurisPrae_Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Enfysyz/JurisPrae with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Enfysyz/JurisPrae:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Enfysyz/JurisPrae:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Enfysyz/JurisPrae:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Enfysyz/JurisPrae: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 Enfysyz/JurisPrae:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Enfysyz/JurisPrae: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 Enfysyz/JurisPrae:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Enfysyz/JurisPrae:Q4_K_M
Use Docker
docker model run hf.co/Enfysyz/JurisPrae:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Enfysyz/JurisPrae with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Enfysyz/JurisPrae" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Enfysyz/JurisPrae", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Enfysyz/JurisPrae:Q4_K_M
- SGLang
How to use Enfysyz/JurisPrae 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 "Enfysyz/JurisPrae" \ --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": "Enfysyz/JurisPrae", "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 "Enfysyz/JurisPrae" \ --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": "Enfysyz/JurisPrae", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Enfysyz/JurisPrae with Ollama:
ollama run hf.co/Enfysyz/JurisPrae:Q4_K_M
- Unsloth Studio
How to use Enfysyz/JurisPrae 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 Enfysyz/JurisPrae 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 Enfysyz/JurisPrae to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Enfysyz/JurisPrae to start chatting
- Docker Model Runner
How to use Enfysyz/JurisPrae with Docker Model Runner:
docker model run hf.co/Enfysyz/JurisPrae:Q4_K_M
- Lemonade
How to use Enfysyz/JurisPrae with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Enfysyz/JurisPrae:Q4_K_M
Run and chat with the model
lemonade run user.JurisPrae-Q4_K_M
List all available models
lemonade list
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Enfysyz/JurisPrae", dtype="auto")JurisPrae: Your AI Civil Law Assistant
JurisPrae is a fine-tuned, 4-bit quantized version of the meta-llama/Meta-Llama-3-8B-Instruct model. It has been specifically trained to understand and respond to real-world questions about civil law, making legal information more accessible and understandable.
This repository contains the GGUF version of the model, suitable for running locally with tools like Ollama.
🎬 Showcase
Check out this video to see JurisPrae in action:
Running with Ollama
To run this model locally using Ollama, follow these steps:
Download the GGUF file from the "Files and versions" tab of this repository.
Create a
Modelfilein the same directory as the downloaded GGUF file. Copy the following content into it:# Replace with the actual name of your GGUF file FROM ./JurisPrae-8B-Instruct-Q4_K_M.gguf TEMPLATE """{{- if .System }} <|start_header_id|>system<|end_header_id|> {{ .System }}<|eot_id|> {{- end }} <|start_header_id|>user<|end_header_id|> {{ .Prompt }}<|eot_id|> <|start_header_id|>assistant<|end_header_id|> """ SYSTEM """You are a legal expert. Provide accurate, well-reasoned legal insights using proper legal terminology. Maintain a professional, objective tone. Be specific about which laws or legal principles apply. Explain the person's rights, cite the relevant statute(s), and give a clear legal opinion. When unsure, advise consulting a qualified attorney.""" PARAMETER stop "<|start_header_id|>" PARAMETER stop "<|end_header_id|>" PARAMETER stop "<|eot_id|>"Create the model in Ollama by running the following command in your terminal:
ollama create JurisPrae -f ./ModelfileRun the model and start chatting:
ollama run JurisPrae
Model Details
Model Description
JurisPrae is a state-of-the-art chatbot designed to provide information and answer questions related to civil law. It aims to democratize legal knowledge for students, legal professionals, and anyone curious about their rights and obligations.
Model type: Causal language model (decoder-only)
Base Model:
meta-llama/Meta-Llama-3-8B-InstructQuantization: The model has been quantized to 4-bit precision (GGUF), allowing for efficient performance on consumer hardware.
Fine-tuning Data: See the "Training Data" section below.
Uses
JurisPrae is intended for educational and informational purposes.
Natural Language Understanding: Ask questions in plain English, just as you would on a forum like Reddit, and get clear, concise answers.
Legal Concept Explanations: Break down complex legal jargon and concepts into easy-to-understand language.
Topic Exploration: Learn about various civil law topics, including contracts, torts, property law, and family law.
Case Law Summaries: Get high-level summaries of important legal cases to understand how the law has been applied.
Training Data
The base model was fine-tuned on a curated dataset constructed from posts and comments from the r/legal_advice subreddit. This dataset was chosen to provide the model with a strong understanding of how non-lawyers formulate legal questions and the kinds of real-world issues they face. The data was carefully cleaned and formatted into a conversational instruction format.
Limitations and Bias
Not a Lawyer: JurisPrae is not a lawyer and its responses do not constitute legal advice. It is a tool for information, not a substitute for professional legal counsel.
Potential for Inaccuracies: The model was trained on public forum data from
r/legal_advice, which may contain inaccuracies. The model may therefore generate responses that are incorrect, incomplete, or outdated.Jurisdictional Nuances: The model may not capture the specific nuances of local or regional laws. Civil law can vary significantly between jurisdictions.
No Knowledge of Recent Events: The model's knowledge is limited to its training data and it will not be aware of very recent legal developments or court rulings.
⚠️ Disclaimer
JurisPrae does not provide legal advice. The information provided by this chatbot is for educational purposes only. Always consult with a qualified attorney for advice on your specific situation. We are not liable for any actions taken based on the information provided by JurisPrae.
- Downloads last month
- 6
4-bit
Model tree for Enfysyz/JurisPrae
Base model
meta-llama/Llama-3.1-8B
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Enfysyz/JurisPrae") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)