mycode
Collection
2 items • Updated
How to use update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b")
model = AutoModelForCausalLM.from_pretrained("update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b", device_map="auto")How to use update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b
How to use update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b" \
--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": "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b" \
--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": "update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b with Docker Model Runner:
docker model run hf.co/update0909/starcoderbase1b-personal-copilot-A100-40GB-colab-1b
This model is a fine-tuned version of bigcode/starcoderbase-1b on an unknown dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.6802 | 0.05 | 100 | 2.4316 |
| 1.6009 | 0.1 | 200 | 1.9687 |
| 1.118 | 0.15 | 300 | 1.4213 |
| 0.9805 | 0.2 | 400 | 1.2800 |
| 1.2515 | 0.25 | 500 | 1.2094 |
| 1.1289 | 0.3 | 600 | 1.1665 |
| 1.069 | 0.35 | 700 | 0.9681 |
| 0.8232 | 0.4 | 800 | 0.9157 |
| 0.8186 | 0.45 | 900 | 0.9054 |
| 0.9282 | 0.5 | 1000 | 0.8904 |
| 1.0739 | 0.55 | 1100 | 0.8726 |
| 1.4045 | 0.6 | 1200 | 0.8713 |
| 1.3319 | 0.65 | 1300 | 0.8699 |
| 0.8325 | 0.7 | 1400 | 0.8673 |
| 0.8188 | 0.75 | 1500 | 0.8645 |
| 1.401 | 0.8 | 1600 | 0.8680 |
| 0.7713 | 0.85 | 1700 | 0.8666 |
| 0.9051 | 0.9 | 1800 | 0.8664 |
| 0.8787 | 0.95 | 1900 | 0.8660 |
| 0.8024 | 1.0 | 2000 | 0.8660 |
Base model
bigcode/starcoderbase-1b