Instructions to use tkhangg0910/Dual-Explain-2_round with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tkhangg0910/Dual-Explain-2_round with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("tkhangg0910/Merged-Dual-Explain-stage_full") model = PeftModel.from_pretrained(base_model, "tkhangg0910/Dual-Explain-2_round") - Transformers
How to use tkhangg0910/Dual-Explain-2_round with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tkhangg0910/Dual-Explain-2_round") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tkhangg0910/Dual-Explain-2_round", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tkhangg0910/Dual-Explain-2_round with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tkhangg0910/Dual-Explain-2_round" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tkhangg0910/Dual-Explain-2_round", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tkhangg0910/Dual-Explain-2_round
- SGLang
How to use tkhangg0910/Dual-Explain-2_round 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 "tkhangg0910/Dual-Explain-2_round" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tkhangg0910/Dual-Explain-2_round", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tkhangg0910/Dual-Explain-2_round" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tkhangg0910/Dual-Explain-2_round", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tkhangg0910/Dual-Explain-2_round with Docker Model Runner:
docker model run hf.co/tkhangg0910/Dual-Explain-2_round
- Xet hash:
- e3ae64985e7769df095daf2840ec9e07d521f9939adc48514d17e7ca005127bc
- Size of remote file:
- 7.61 kB
- SHA256:
- d9c57423b57f286016400325e513804db93dc5ba332bd7242f27d3a0181b5820
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.