Instructions to use keisoft/pretrain1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keisoft/pretrain1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="keisoft/pretrain1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("keisoft/pretrain1") model = AutoModelForCausalLM.from_pretrained("keisoft/pretrain1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use keisoft/pretrain1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keisoft/pretrain1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keisoft/pretrain1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/keisoft/pretrain1
- SGLang
How to use keisoft/pretrain1 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 "keisoft/pretrain1" \ --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": "keisoft/pretrain1", "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 "keisoft/pretrain1" \ --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": "keisoft/pretrain1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use keisoft/pretrain1 with Docker Model Runner:
docker model run hf.co/keisoft/pretrain1
Commit History
-
Upload model
Verified signature96c2b80 -
Upload model
Verified signaturea441640 -
Upload model
Verified signatureedf0648 -
Upload model
Verified signaturee1e9d4b -
Upload model
Verified signature33b2243 -
Upload model
Verified signature5ca5064 -
Upload model
Verified signature065bc28 -
Upload model
Verified signature0b51d11 -
Upload model
Verified signature9f78516 -
Upload model
Verified signature12fb67d -
Upload model
Verified signature59bed5a -
Upload model
Verified signature08947a3 -
Upload model
Verified signaturedfd1dd7 -
Upload model
Verified signaturec5223c9 -
Upload model
Verified signature8e1cac4
-
Upload model
Verified signature6f17723 -
initial commit
Verified signaturef2a30a1