Instructions to use kaytoo2022/t5_technical_qa_with_react with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaytoo2022/t5_technical_qa_with_react with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaytoo2022/t5_technical_qa_with_react")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("kaytoo2022/t5_technical_qa_with_react") model = AutoModelForSeq2SeqLM.from_pretrained("kaytoo2022/t5_technical_qa_with_react", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kaytoo2022/t5_technical_qa_with_react with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaytoo2022/t5_technical_qa_with_react" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaytoo2022/t5_technical_qa_with_react", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kaytoo2022/t5_technical_qa_with_react
- SGLang
How to use kaytoo2022/t5_technical_qa_with_react 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 "kaytoo2022/t5_technical_qa_with_react" \ --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": "kaytoo2022/t5_technical_qa_with_react", "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 "kaytoo2022/t5_technical_qa_with_react" \ --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": "kaytoo2022/t5_technical_qa_with_react", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kaytoo2022/t5_technical_qa_with_react with Docker Model Runner:
docker model run hf.co/kaytoo2022/t5_technical_qa_with_react
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,50 @@ model-index:
|
|
| 9 |
inference: true
|
| 10 |
library_name: transformers
|
| 11 |
pipeline_tag: text2text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
<!-- This model card has been generated automatically according to the information Keras had access to. You should
|
|
|
|
| 9 |
inference: true
|
| 10 |
library_name: transformers
|
| 11 |
pipeline_tag: text2text-generation
|
| 12 |
+
widget:
|
| 13 |
+
- text: >-
|
| 14 |
+
summarize: function Example() {
|
| 15 |
+
let [isLoading, setIsLoading] = React.useState(false);
|
| 16 |
+
|
| 17 |
+
let handlePress = () => {
|
| 18 |
+
// Trigger button pending state
|
| 19 |
+
setIsLoading(true);
|
| 20 |
+
|
| 21 |
+
setTimeout(() => {
|
| 22 |
+
// Cancel button pending state
|
| 23 |
+
setIsLoading(false);
|
| 24 |
+
}, 3000);
|
| 25 |
+
};
|
| 26 |
+
|
| 27 |
+
return (
|
| 28 |
+
<Button variant="primary" isPending={isLoading} onPress={handlePress}>
|
| 29 |
+
Click me!
|
| 30 |
+
</Button>
|
| 31 |
+
);
|
| 32 |
+
}
|
| 33 |
+
example_title: Question answering
|
| 34 |
+
- text: >-
|
| 35 |
+
question: What does the setTimeout function do? context: function Example() {
|
| 36 |
+
let [isLoading, setIsLoading] = React.useState(false);
|
| 37 |
+
|
| 38 |
+
let handlePress = () => {
|
| 39 |
+
// Trigger button pending state
|
| 40 |
+
setIsLoading(true);
|
| 41 |
+
|
| 42 |
+
setTimeout(() => {
|
| 43 |
+
// Cancel button pending state
|
| 44 |
+
setIsLoading(false);
|
| 45 |
+
}, 3000);
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
return (
|
| 49 |
+
<Button variant="primary" isPending={isLoading} onPress={handlePress}>
|
| 50 |
+
Click me!
|
| 51 |
+
</Button>
|
| 52 |
+
);
|
| 53 |
+
}
|
| 54 |
+
example_title: Summarization
|
| 55 |
+
|
| 56 |
---
|
| 57 |
|
| 58 |
<!-- This model card has been generated automatically according to the information Keras had access to. You should
|