totally-not-an-llm/EverythingLM-data-V3
Viewer • Updated • 1.07k • 160 • 32
How to use KnutJaegersberg/Deacon-34b-4bit with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="KnutJaegersberg/Deacon-34b-4bit") # Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("KnutJaegersberg/Deacon-34b-4bit")
model = AutoModel.from_pretrained("KnutJaegersberg/Deacon-34b-4bit")How to use KnutJaegersberg/Deacon-34b-4bit with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "KnutJaegersberg/Deacon-34b-4bit"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "KnutJaegersberg/Deacon-34b-4bit",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/KnutJaegersberg/Deacon-34b-4bit
How to use KnutJaegersberg/Deacon-34b-4bit with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "KnutJaegersberg/Deacon-34b-4bit" \
--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": "KnutJaegersberg/Deacon-34b-4bit",
"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 "KnutJaegersberg/Deacon-34b-4bit" \
--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": "KnutJaegersberg/Deacon-34b-4bit",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use KnutJaegersberg/Deacon-34b-4bit with Docker Model Runner:
docker model run hf.co/KnutJaegersberg/Deacon-34b-4bit
The perfect organism.
An adapter for KnutJaegersberg/Yi-34B-Llamafied. 5 epochs with NEFTune. The brand new bitsandbytes 4-bit file format.
Run pip install -U bitsandbytes and install this pull requested transformer version: https://github.com/poedator/transformers/tree/save4
Might still be buggy. It was a bit too early. I'll wait until the functionality is officially supported, due to some cuda issues. I don't want to resolve those, I'll just wait a couple of days.
Prompt Example:
### System:
You are an AI assistant. User will give you a task. Your goal is to complete the task as faithfully as you can. While performing the task think step-by-step and justify your steps.
### Instruction:
How do you fine tune a large language model?
### Response: