Instructions to use llmware/slim-qa-gen-tiny-ov with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/slim-qa-gen-tiny-ov with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llmware/slim-qa-gen-tiny-ov")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llmware/slim-qa-gen-tiny-ov") model = AutoModelForCausalLM.from_pretrained("llmware/slim-qa-gen-tiny-ov", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llmware/slim-qa-gen-tiny-ov with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llmware/slim-qa-gen-tiny-ov" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmware/slim-qa-gen-tiny-ov", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/llmware/slim-qa-gen-tiny-ov
- SGLang
How to use llmware/slim-qa-gen-tiny-ov 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 "llmware/slim-qa-gen-tiny-ov" \ --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": "llmware/slim-qa-gen-tiny-ov", "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 "llmware/slim-qa-gen-tiny-ov" \ --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": "llmware/slim-qa-gen-tiny-ov", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use llmware/slim-qa-gen-tiny-ov with Docker Model Runner:
docker model run hf.co/llmware/slim-qa-gen-tiny-ov
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
inference: false
|
| 4 |
-
tags: [green, p1, llmware-fx, ov
|
| 5 |
---
|
| 6 |
|
| 7 |
-
# slim-
|
| 8 |
|
| 9 |
-
**slim-
|
| 10 |
|
| 11 |
-
This is an OpenVino int4 quantized version of slim-
|
| 12 |
|
| 13 |
|
| 14 |
### Model Description
|
|
@@ -16,24 +16,13 @@ This is an OpenVino int4 quantized version of slim-extract-tiny, providing a ver
|
|
| 16 |
- **Developed by:** llmware
|
| 17 |
- **Model type:** tinyllama
|
| 18 |
- **Parameters:** 1.1 billion
|
| 19 |
-
- **Model Parent:** llmware/slim-
|
| 20 |
- **Language(s) (NLP):** English
|
| 21 |
- **License:** Apache 2.0
|
| 22 |
-
- **Uses:**
|
| 23 |
- **RAG Benchmark Accuracy Score:** NA
|
| 24 |
- **Quantization:** int4
|
| 25 |
|
| 26 |
-
### Example Usage
|
| 27 |
-
|
| 28 |
-
from llmware.models import ModelCatalog
|
| 29 |
-
|
| 30 |
-
text_passage = "The company announced that for the current quarter the total revenue increased by 9% to $125 million."
|
| 31 |
-
model = ModelCatalog().load_model("slim-extract-tiny-ov")
|
| 32 |
-
llm_response = model.function_call(text_passage, function="extract", params=["revenue"])
|
| 33 |
-
|
| 34 |
-
Output: `llm_response = {"revenue": [$125 million"]}`
|
| 35 |
-
|
| 36 |
-
|
| 37 |
## Model Card Contact
|
| 38 |
|
| 39 |
[llmware on github](https://www.github.com/llmware-ai/llmware)
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
inference: false
|
| 4 |
+
tags: [green, p1, llmware-fx, ov]
|
| 5 |
---
|
| 6 |
|
| 7 |
+
# slim-qa-gen-tiny-ov
|
| 8 |
|
| 9 |
+
**slim-qa-gen-tiny-ov** is a specialized function calling model that generates a question and answer pair from a context passage.
|
| 10 |
|
| 11 |
+
This is an OpenVino int4 quantized version of slim-qa-gen-tiny, providing a very fast, very small inference implementation, optimized for AI PCs using Intel GPU, CPU and NPU.
|
| 12 |
|
| 13 |
|
| 14 |
### Model Description
|
|
|
|
| 16 |
- **Developed by:** llmware
|
| 17 |
- **Model type:** tinyllama
|
| 18 |
- **Parameters:** 1.1 billion
|
| 19 |
+
- **Model Parent:** llmware/slim-qa-gen-tiny
|
| 20 |
- **Language(s) (NLP):** English
|
| 21 |
- **License:** Apache 2.0
|
| 22 |
+
- **Uses:** Automated generation of question-answer pairs from complex business documents
|
| 23 |
- **RAG Benchmark Accuracy Score:** NA
|
| 24 |
- **Quantization:** int4
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## Model Card Contact
|
| 27 |
|
| 28 |
[llmware on github](https://www.github.com/llmware-ai/llmware)
|