Instructions to use CreatorPhan/ViQA-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CreatorPhan/ViQA-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CreatorPhan/ViQA-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("CreatorPhan/ViQA-small") model = AutoModelForSeq2SeqLM.from_pretrained("CreatorPhan/ViQA-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CreatorPhan/ViQA-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CreatorPhan/ViQA-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CreatorPhan/ViQA-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CreatorPhan/ViQA-small
- SGLang
How to use CreatorPhan/ViQA-small 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 "CreatorPhan/ViQA-small" \ --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": "CreatorPhan/ViQA-small", "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 "CreatorPhan/ViQA-small" \ --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": "CreatorPhan/ViQA-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CreatorPhan/ViQA-small with Docker Model Runner:
docker model run hf.co/CreatorPhan/ViQA-small
Commit ·
8263481
1
Parent(s): 70c7ba4
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- vi
|
| 4 |
-
pipeline_tag:
|
| 5 |
---
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- vi
|
| 4 |
+
pipeline_tag: text2text-generation
|
| 5 |
---
|
| 6 |
|
| 7 |
+
Mô hình này được tuning từ pretrained ViFlanT5-small model với 77M tham số với 2 epochs trên 87GB text của bộ CC100.
|
| 8 |
+
|
| 9 |
+
Mô hình được huấn luyện cho tác vụ đọc hiểu tiếng Việt. Cung cấp cho mô hình câu hỏi và ngữ cảnh (không quá 400 từ) và mô hình sẽ trích xuất ra câu trả lời trong ngữ cảnh đó.
|
| 10 |
|
| 11 |
|
| 12 |
|