Instructions to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/meta-llama-3.1-8b-bnb-4bit") model = PeftModel.from_pretrained(base_model, "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3") - Transformers
How to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3
- SGLang
How to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 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 "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3" \ --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": "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3", "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 "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3" \ --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": "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3 with Docker Model Runner:
docker model run hf.co/hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-AI-v3
Llama-3.1-8B-Mock-Trial-v3
This model is a fine-tuned version of Meta-Llama-3.1-8B, specifically optimized for legal discovery, witness statement analysis, and fact-retrieval in Mock Trial contexts.
π Try the Live Interface!
If you want to experience the logic of this project in a high-speed production environment, check out the Mock Trial AI V3 Space: π Mock Trial AI V3 on Hugging Face Spaces
Note on Architecture: To ensure sub-second latency and 24/7 availability, the live Production Space utilizes the Llama 3.1 Base Model accelerated by the Groq LPU, using Instruction Distillation derived from this fine-tuning research. These weights remain available here for developers looking to run the specialized LoRA adapter locally.
If you find these weights or the dataset useful, please consider leaving a β€οΈ Like on this repository!
Model Details
Model Description
- Developed by: HobbesTheComputerScientist
- Model type: LoRA Adapter for Llama 3.1 8B
- Language(s) (NLP): English
- License: MIT
- Finetuned from model: unsloth/meta-llama-3.1-8b-bnb-4bit
Uses
Direct Use
The model is intended to assist in Mock Trial preparation by:
- Direct & Cross-Ex Simulation: Practice examinations against adaptive deponent personas.
- Fact Extraction: Summarizing key legal facts from 6-12 page witness statements.
- Theory Analysis: Evaluating how evidence benefits or hurdles a specific Case Theory.
- Objection Filtering: Checking the admissibility of questions based on the Rules of Evidence.
Out-of-Scope Use
This model is an educational tool designed for mock trial simulations. It should not be used for actual legal advice or in real-court proceedings.
Bias, Risks, and Limitations
As a fine-tuned LLM, the model may still produce hallucinations. Users should always verify AI-generated analysis against the official case packet "Ground Truth."
How to Get Started with the Model
To use this model with Unsloth, use the following code:
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "hobbesthecomputerscientist/Llama-3.1-8B-Mock-Trial-v3",
max_seq_length = 2048,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
- Downloads last month
- 2