MBZUAI/LaMini-instruction
Viewer • Updated • 2.59M • 1.13k • 147
How to use schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct", trust_remote_code=True, dtype="auto")How to use schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct
How to use schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct" \
--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": "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct",
"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 "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct" \
--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": "schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct with Docker Model Runner:
docker model run hf.co/schuler/experimental-JP47D21-KPhi-3-micro-4k-instruct
UNDER CONSTRUCTION
@article{Schuler_2022_GPCRPNN,
title={Grouped Pointwise Convolutions Reduce Parameters in Convolutional Neural Networks}, volume={28},
url={https://mendel-journal.org/index.php/mendel/article/view/169},
DOI={10.13164/mendel.2022.1.023},
number={1},
journal={MENDEL},
author={Schwarz Schuler, Joao Paulo and Romani, Santiago and Abdel-Nasser, Mohamed and Rashwan, Hatem and Puig, Domenec},
year={2022}, month={Jun.}, pages={23-31} }