WestLake
Collection
5 items • Updated • 1
How to use macadeliccc/Laser-WestLake-2x7b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="macadeliccc/Laser-WestLake-2x7b") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("macadeliccc/Laser-WestLake-2x7b")
model = AutoModelForCausalLM.from_pretrained("macadeliccc/Laser-WestLake-2x7b")How to use macadeliccc/Laser-WestLake-2x7b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "macadeliccc/Laser-WestLake-2x7b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "macadeliccc/Laser-WestLake-2x7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/macadeliccc/Laser-WestLake-2x7b
How to use macadeliccc/Laser-WestLake-2x7b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "macadeliccc/Laser-WestLake-2x7b" \
--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": "macadeliccc/Laser-WestLake-2x7b",
"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 "macadeliccc/Laser-WestLake-2x7b" \
--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": "macadeliccc/Laser-WestLake-2x7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use macadeliccc/Laser-WestLake-2x7b with Docker Model Runner:
docker model run hf.co/macadeliccc/Laser-WestLake-2x7b
This model is a moerge of cognitivecomputations/WestLake-7B-v2-laser and SanjiWatsuki/Kunoichi-DPO-v2-7B
Usage is the same as the original WestLake-7B
Available here
----Benchmark Complete---- 2024-01-27 19:12:49 Time taken: 24.3 mins Prompt Format: ChatML Model: macadeliccc/Laser-WestLake-2x7b-GGUF Score (v2): 75.42 Parseable: 171.0 --------------- Batch completed Time taken: 24.4 mins ---------------
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 74.00 |
| AI2 Reasoning Challenge (25-Shot) | 72.27 |
| HellaSwag (10-Shot) | 88.44 |
| MMLU (5-Shot) | 64.71 |
| TruthfulQA (0-shot) | 69.25 |
| Winogrande (5-shot) | 85.79 |
| GSM8k (5-shot) | 63.53 |