Instructions to use tmnam20/test_pretrain_pipeline with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tmnam20/test_pretrain_pipeline with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tmnam20/test_pretrain_pipeline")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tmnam20/test_pretrain_pipeline") model = AutoModelForCausalLM.from_pretrained("tmnam20/test_pretrain_pipeline", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tmnam20/test_pretrain_pipeline with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tmnam20/test_pretrain_pipeline" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tmnam20/test_pretrain_pipeline", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tmnam20/test_pretrain_pipeline
- SGLang
How to use tmnam20/test_pretrain_pipeline 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 "tmnam20/test_pretrain_pipeline" \ --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": "tmnam20/test_pretrain_pipeline", "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 "tmnam20/test_pretrain_pipeline" \ --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": "tmnam20/test_pretrain_pipeline", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tmnam20/test_pretrain_pipeline with Docker Model Runner:
docker model run hf.co/tmnam20/test_pretrain_pipeline
- Xet hash:
- d31f80bb9a0e0928e9156b58c6ae5c3b54a3114d1db7a1b838f69cf755853584
- Size of remote file:
- 4.09 kB
- SHA256:
- 2173f3b2a9739827ec97f25988900206572f63dd28f7342627ed3e42e6b3bd67
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.