Instructions to use zstanjj/SlimPLM-Retrieval-Necessity-Judgment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zstanjj/SlimPLM-Retrieval-Necessity-Judgment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zstanjj/SlimPLM-Retrieval-Necessity-Judgment")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zstanjj/SlimPLM-Retrieval-Necessity-Judgment") model = AutoModelForCausalLM.from_pretrained("zstanjj/SlimPLM-Retrieval-Necessity-Judgment") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zstanjj/SlimPLM-Retrieval-Necessity-Judgment with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zstanjj/SlimPLM-Retrieval-Necessity-Judgment" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zstanjj/SlimPLM-Retrieval-Necessity-Judgment", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zstanjj/SlimPLM-Retrieval-Necessity-Judgment
- SGLang
How to use zstanjj/SlimPLM-Retrieval-Necessity-Judgment 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 "zstanjj/SlimPLM-Retrieval-Necessity-Judgment" \ --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": "zstanjj/SlimPLM-Retrieval-Necessity-Judgment", "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 "zstanjj/SlimPLM-Retrieval-Necessity-Judgment" \ --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": "zstanjj/SlimPLM-Retrieval-Necessity-Judgment", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zstanjj/SlimPLM-Retrieval-Necessity-Judgment with Docker Model Runner:
docker model run hf.co/zstanjj/SlimPLM-Retrieval-Necessity-Judgment
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,7 +23,7 @@ license: llama2
|
|
| 23 |
|
| 24 |
- [1/25/2024]: Retrieval Necessity Judgment Model released in [Hugging Face](https://huggingface.co/zstanjj/SlimPLM-Retrieval-Necessity-Judgment/).
|
| 25 |
- [2/20/2024]: Query Rewriting Model released in [Hugging Face](https://huggingface.co/zstanjj/SlimPLM-Query-Rewriting/).
|
| 26 |
-
- [5/19/2024]: Our new work, **[
|
| 27 |
|
| 28 |
## 🎬 Get Started
|
| 29 |
|
|
|
|
| 23 |
|
| 24 |
- [1/25/2024]: Retrieval Necessity Judgment Model released in [Hugging Face](https://huggingface.co/zstanjj/SlimPLM-Retrieval-Necessity-Judgment/).
|
| 25 |
- [2/20/2024]: Query Rewriting Model released in [Hugging Face](https://huggingface.co/zstanjj/SlimPLM-Query-Rewriting/).
|
| 26 |
+
- [5/19/2024]: Our new work, **[Small Models, Big Insights: Leveraging Slim Proxy Models To Decide When and What to Retrieve for LLMs](https://aclanthology.org/2024.acl-long.242/)**, has been accepted by **ACL 2024 main** conference.
|
| 27 |
|
| 28 |
## 🎬 Get Started
|
| 29 |
|