Frankenmodels
Collection
They're not supposed to be that size! Neat, right? • 8 items • Updated • 3
How to use chargoddard/mixtralnt-4x7b-test with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="chargoddard/mixtralnt-4x7b-test") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("chargoddard/mixtralnt-4x7b-test")
model = AutoModelForCausalLM.from_pretrained("chargoddard/mixtralnt-4x7b-test")How to use chargoddard/mixtralnt-4x7b-test with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "chargoddard/mixtralnt-4x7b-test"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "chargoddard/mixtralnt-4x7b-test",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/chargoddard/mixtralnt-4x7b-test
How to use chargoddard/mixtralnt-4x7b-test with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "chargoddard/mixtralnt-4x7b-test" \
--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": "chargoddard/mixtralnt-4x7b-test",
"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 "chargoddard/mixtralnt-4x7b-test" \
--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": "chargoddard/mixtralnt-4x7b-test",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use chargoddard/mixtralnt-4x7b-test with Docker Model Runner:
docker model run hf.co/chargoddard/mixtralnt-4x7b-test
Oh boy, a new model architecture in Transformers! Time to do profane things with it.
What if instead of training a MoE from scratch, we took some pre-trained Mistral models and shoved them in a little clown car?
Uses parts from the following models:
Works and generates coherent text. The big question here is if the hack I used to populate the MoE gates works well enough to take advantage of all of the experts. Let's find out!
Prompt format: maybe alpaca??? or chatml??? life is full of mysteries