Text Generation
Transformers
PyTorch
Safetensors
English
llama
legal
Eval Results (legacy)
text-generation-inference
Instructions to use AdaptLLM/law-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdaptLLM/law-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdaptLLM/law-chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AdaptLLM/law-chat") model = AutoModelForCausalLM.from_pretrained("AdaptLLM/law-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AdaptLLM/law-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdaptLLM/law-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdaptLLM/law-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AdaptLLM/law-chat
- SGLang
How to use AdaptLLM/law-chat 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 "AdaptLLM/law-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdaptLLM/law-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "AdaptLLM/law-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdaptLLM/law-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AdaptLLM/law-chat with Docker Model Runner:
docker model run hf.co/AdaptLLM/law-chat
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.8b6c817
-
Update README.md
Verified signatureac98e58
-
Update README.md
Verified signatured93a089
-
Update README.md
Verified signature3e382a4 -
Update README.md
Verified signature8a8178b
-
Update README.md (#2)
Verified signature- Update README.md (01a537bc8bf2b3f1ca553a63093abe59ae018c66) Co-authored-by: instruction-pretrain <instruction-pretrain@users.noreply.huggingface.co>00e443f
-
Update README.md
Verified signaturee340bb6
-
Update README.md
Verified signature7c2443e
-
Update README.md
Verified signaturef67d3f3
-
Update README.md
Verified signaturea60d34d
-
Adding Evaluation Results (#1)
Verified signature- Adding Evaluation Results (a34e87f8fd0a2842712d11c7e227e989672a7705) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>3af1060
-
Update README.md
Verified signaturefe297e8
-
Update README.md
Verified signaturedd0987f
-
Update README.md
Verified signatureaf9cdd6
-
Update README.md
Verified signature3b46cc2
-
Update README.md
217f271 -
Upload tokenizer.json
83c61fc
-
Update README.md
ca9206e
-
Update README.md
0bf36fd
-
Update README.md
8634064
-
Update README.md
a164e65
-
Update README.md
f39b53b
-
Update README.md
873d29a -
Update README.md
6b48feb
-
Update README.md
518a89c
-
Update README.md
0041e61 -
Update README.md
e2e23a7 -
readme
67a09ee -
init law-chat
0b93c1f -
initial commit
3c68c47