HuggingFaceH4/ultrachat_200k
Viewer • Updated • 515k • 66.5k • 728
How to use ehristoforu/Gistral-16B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ehristoforu/Gistral-16B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ehristoforu/Gistral-16B")
model = AutoModelForCausalLM.from_pretrained("ehristoforu/Gistral-16B")How to use ehristoforu/Gistral-16B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ehristoforu/Gistral-16B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ehristoforu/Gistral-16B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ehristoforu/Gistral-16B
How to use ehristoforu/Gistral-16B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ehristoforu/Gistral-16B" \
--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": "ehristoforu/Gistral-16B",
"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 "ehristoforu/Gistral-16B" \
--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": "ehristoforu/Gistral-16B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ehristoforu/Gistral-16B with Docker Model Runner:
docker model run hf.co/ehristoforu/Gistral-16B
We created a model from other cool models to combine everything into one cool model.
GGUF Version: ehristoforu/Gistral-16B-Q4_K_M-GGUF
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ehristoforu/Gistral-16B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [
{"role": "user", "content": "What is your favourite condiment?"},
{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
{"role": "user", "content": "Do you have mayonnaise recipes?"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=20)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Base model: mistralai/Mistral-7B-Instruct-v0.2
Merge models:
Merge datasets: