appvoid/no-prompt-50k
Viewer β’ Updated β’ 50k β’ 5
How to use appvoid/palmer-002-2401 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="appvoid/palmer-002-2401")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("appvoid/palmer-002-2401")
model = AutoModelForCausalLM.from_pretrained("appvoid/palmer-002-2401")
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]:]))How to use appvoid/palmer-002-2401 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "appvoid/palmer-002-2401"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "appvoid/palmer-002-2401",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/appvoid/palmer-002-2401
How to use appvoid/palmer-002-2401 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "appvoid/palmer-002-2401" \
--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": "appvoid/palmer-002-2401",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "appvoid/palmer-002-2401" \
--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": "appvoid/palmer-002-2401",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use appvoid/palmer-002-2401 with Docker Model Runner:
docker model run hf.co/appvoid/palmer-002-2401
This is a small improvement over a (now un-prompted zyte) tinyllama model
note that this is a zero-shot setting as opposite to open llm leaderboard's few-shot evals
model ARC-C OBQA HellaSwag PIQA Winogrande Average
tinyllama | 0.3029 | 0.3600 | 0.5935 | 0.7329 | 0.5959 | 0.5170 |
palmer-002 | 0.3242 | 0.3700 | 0.5956 | 0.7345 | 0.5888 | 0.5226 |
palmer-002-2401 | 0.3294 | 0.3700 | 0.5950 | 0.7399 | 0.5896 | 0.5247 | (this)
babbage-002 | 0.3285 | 0.3620 | 0.6380 | 0.7606 | 0.6085 | 0.5395 |
Training took ~1 A100 gpu hour. It was trained on 50,000 gpt-4 shuffled samples. palmer was fine-tuned using lower learning rates ensuring it keeps as much general knowledge as possible.
no prompt π