Text Generation
Transformers
Safetensors
English
stablelm_epoch
causal-lm
text-generation-inference
Merge
conversational
custom_code
Instructions to use Heng666/StableMedZephyr-Merged-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Heng666/StableMedZephyr-Merged-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Heng666/StableMedZephyr-Merged-3b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Heng666/StableMedZephyr-Merged-3b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Heng666/StableMedZephyr-Merged-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Heng666/StableMedZephyr-Merged-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Heng666/StableMedZephyr-Merged-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Heng666/StableMedZephyr-Merged-3b
- SGLang
How to use Heng666/StableMedZephyr-Merged-3b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Heng666/StableMedZephyr-Merged-3b" \ --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": "Heng666/StableMedZephyr-Merged-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "Heng666/StableMedZephyr-Merged-3b" \ --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": "Heng666/StableMedZephyr-Merged-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Heng666/StableMedZephyr-Merged-3b with Docker Model Runner:
docker model run hf.co/Heng666/StableMedZephyr-Merged-3b
FOR EXPERIMENT
Description
stabilityai/stablelm-zephyr-3b, StableMed-3b merged with a new, experimental implementation of "dare ties" via mergekit. See:
Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Usage
StableLM Zephyr 3B uses the following instruction format:
<|user|>
List 3 synonyms for the word "tiny"<|endoftext|>
<|assistant|>
1. Dwarf
2. Little
3. Petite<|endoftext|>
Testing Notes
Merged in mergekit with the following config, and the tokenizer from chargoddard's Yi-Llama:
models:
- model: stabilityai/stablelm-zephyr-3b
# no parameters necessary for base model
- model: cxllin/StableMed-3b
parameters:
weight: 0.08
density: 0.5
merge_method: dare_ties
base_model: stabilityai/stablelm-zephyr-3b
parameters:
int8_mask: true
dtype: bfloat16
Model Details
- Downloads last month
- 4
docker model run hf.co/Heng666/StableMedZephyr-Merged-3b