Text Generation
Transformers
English
tokenizer
bpe
byte-level
chatml
tool-use
code
python
conversational
Instructions to use JonathanMiddleton/daisy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JonathanMiddleton/daisy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JonathanMiddleton/daisy") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JonathanMiddleton/daisy", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JonathanMiddleton/daisy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JonathanMiddleton/daisy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JonathanMiddleton/daisy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JonathanMiddleton/daisy
- SGLang
How to use JonathanMiddleton/daisy 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 "JonathanMiddleton/daisy" \ --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": "JonathanMiddleton/daisy", "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 "JonathanMiddleton/daisy" \ --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": "JonathanMiddleton/daisy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JonathanMiddleton/daisy with Docker Model Runner:
docker model run hf.co/JonathanMiddleton/daisy
| {#- Daisy Chat Template v2 -#} | |
| {#- Supports: ChatML format, tool calling, multipart content -#} | |
| {#- Macro to render content (string or multipart) -#} | |
| {%- macro render_content(content) -%} | |
| {%- if content is string -%} | |
| {{ content }} | |
| {%- elif content is iterable -%} | |
| {%- for part in content -%} | |
| {%- if part.type == 'text' -%} | |
| {{ part.text }} | |
| {%- elif part.type == 'tool_call' -%} | |
| <|tool_call|>{{ part.text }}<|/tool_call|> | |
| {%- elif part.type == 'tool_result' -%} | |
| <|tool_result|>{{ part.text }}<|/tool_result|> | |
| {%- elif part.type == 'python' -%} | |
| <|python|>{{ part.text }}<|/python|> | |
| {%- elif part.type == 'output' -%} | |
| <|output|>{{ part.text }}<|/output|> | |
| {%- elif part.type == 'think' -%} | |
| <|think|>{{ part.text }}<|/think|> | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- else -%} | |
| {{ content }} | |
| {%- endif -%} | |
| {%- endmacro -%} | |
| {#- Main message loop -#} | |
| {%- for message in messages -%} | |
| {%- if message.role == 'system' -%} | |
| <|im_start|>system | |
| {{ message.content }}<|im_end|> | |
| {% elif message.role == 'user' -%} | |
| <|im_start|>user | |
| {{ message.content }}<|im_end|> | |
| {% elif message.role == 'assistant' -%} | |
| <|im_start|>assistant | |
| {% generation %}{{ render_content(message.content) }}<|im_end|>{% endgeneration %} | |
| {% elif message.role == 'tool' -%} | |
| <|tool_result|>{{ message.content }}<|/tool_result|> | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {#- Generation prompt -#} | |
| {%- if add_generation_prompt -%} | |
| <|im_start|>assistant | |
| {% generation %}{% endgeneration %} | |
| {%- endif -%} | |