Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use kzhou35/coldstart with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kzhou35/coldstart with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kzhou35/coldstart") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kzhou35/coldstart") model = AutoModelForCausalLM.from_pretrained("kzhou35/coldstart") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use kzhou35/coldstart with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kzhou35/coldstart" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kzhou35/coldstart", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kzhou35/coldstart
- SGLang
How to use kzhou35/coldstart 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 "kzhou35/coldstart" \ --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": "kzhou35/coldstart", "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 "kzhou35/coldstart" \ --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": "kzhou35/coldstart", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kzhou35/coldstart with Docker Model Runner:
docker model run hf.co/kzhou35/coldstart
File size: 1,625 Bytes
4fe36e5 | 1 2 3 4 5 6 7 8 | {"current_steps": 3, "total_steps": 20, "loss": 1.0435, "lr": 4.72751631047092e-05, "epoch": 0.2874251497005988, "percentage": 15.0, "elapsed_time": "0:05:37", "remaining_time": "0:31:54", "throughput": 1984.49, "total_tokens": 670576}
{"current_steps": 6, "total_steps": 20, "loss": 0.6701, "lr": 3.969463130731183e-05, "epoch": 0.5748502994011976, "percentage": 30.0, "elapsed_time": "0:11:13", "remaining_time": "0:26:11", "throughput": 2014.35, "total_tokens": 1356912}
{"current_steps": 9, "total_steps": 20, "loss": 0.4917, "lr": 2.8910861626005776e-05, "epoch": 0.8622754491017964, "percentage": 45.0, "elapsed_time": "0:16:49", "remaining_time": "0:20:33", "throughput": 2021.8, "total_tokens": 2040576}
{"current_steps": 12, "total_steps": 20, "loss": 0.4176, "lr": 1.7274575140626318e-05, "epoch": 1.095808383233533, "percentage": 60.0, "elapsed_time": "0:21:22", "remaining_time": "0:14:15", "throughput": 2019.6, "total_tokens": 2590528}
{"current_steps": 15, "total_steps": 20, "loss": 0.3634, "lr": 7.3223304703363135e-06, "epoch": 1.3832335329341316, "percentage": 75.0, "elapsed_time": "0:26:59", "remaining_time": "0:08:59", "throughput": 2022.79, "total_tokens": 3275616}
{"current_steps": 18, "total_steps": 20, "loss": 0.3434, "lr": 1.2235870926211619e-06, "epoch": 1.6706586826347305, "percentage": 90.0, "elapsed_time": "0:32:34", "remaining_time": "0:03:37", "throughput": 2025.83, "total_tokens": 3959408}
{"current_steps": 20, "total_steps": 20, "epoch": 1.8622754491017965, "percentage": 100.0, "elapsed_time": "0:36:39", "remaining_time": "0:00:00", "throughput": 2008.18, "total_tokens": 4416112}
|