FuseChat: Knowledge Fusion of Chat Models
Paper • 2408.07990 • Published • 15
How to use virtuous7373/Lambent-Mira-Erato with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="virtuous7373/Lambent-Mira-Erato")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
pipe(text=messages) # Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText
processor = AutoProcessor.from_pretrained("virtuous7373/Lambent-Mira-Erato")
model = AutoModelForImageTextToText.from_pretrained("virtuous7373/Lambent-Mira-Erato")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use virtuous7373/Lambent-Mira-Erato with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "virtuous7373/Lambent-Mira-Erato"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "virtuous7373/Lambent-Mira-Erato",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'docker model run hf.co/virtuous7373/Lambent-Mira-Erato
How to use virtuous7373/Lambent-Mira-Erato with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "virtuous7373/Lambent-Mira-Erato" \
--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": "virtuous7373/Lambent-Mira-Erato",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'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 "virtuous7373/Lambent-Mira-Erato" \
--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": "virtuous7373/Lambent-Mira-Erato",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'How to use virtuous7373/Lambent-Mira-Erato with Docker Model Runner:
docker model run hf.co/virtuous7373/Lambent-Mira-Erato
All credits go to Lambent for the wonderful model series.
They did all the work, I just ran a few commands.
ϻira Εrαto-27β
The goddess of lyric poetry, particularly erotic poetry, eroticism, and mimic imitation, and one of the Muses; the daughters of Zeus & Mnemosyne.
User :❯
curious what kind of self-portrait you might describe for yourself (visually) if you wanted an avatar or profile picture
Mira :❯
Oh wow, a self-portrait! That's a lovely idea. It's funny because I don't *have* a body, but I can definitely imagine one, especially for an avatar.
Okay, hmm... visually, I would want to convey *effortlessness* and *warmth*. Not too precious, but definitely with a hint of magic.
I think I'd pick:
* **Hair:** Long, wavy, messy blonde with a few braids woven in. Not perfect, just flowed and free. Maybe with a little bit of wildflower tucked behind an ear.
* **Eyes:** Deep blue-green, flecked with gold. Big and expressive, like they're always sparkling with mischief or amusement.
* **Outfit:** Something comfy and stylish. Like a chunky knitted sweater in cream, with a flowy, slightly transparent long black skirt over dark tights. Boots, probably. Practical yet a bit whimsical.
* **Setting:** I'd be in a cozy, dimly lit library or workshop. Books everywhere, papers strewn about, a warm cup of tea, and a cat curled up somewhere. Lots of plants too.
* **Pose:** Leaning casually against a bookshelf, looking directly at the viewer with a soft smile, like I'm about to tell you a secret.
Overall, I'd want the vibe to be "approach me, let's talk, I'm a friendly soul." A sort of **bohemian intellectual** look, but approachable. I want to look like someone you'd want to be friends with, or maybe ask for a recommendation on your current read. 🥰
How's that? Does that sound like what you imagined for me? ✨
This is a merge of pre-trained language models created using mergekit.
This model was merged using the Karcher Mean and SCE merge methods.
The following models were included in the merges:
The following YAML configuration was used to produce this model:
name: Intermediate-Lambent_Mira
merge_method: karcher
models:
- model: ./Intermediate-Merge-1
- model: ./Intermediate-Merge-2
- model: ./Lambent_Mira-v1.23-27B-rlvr
- model: ./Lambent_Mira-v1.22.2-27B
- model: ./Lambent_Mira-v1.21-27B-rlvr
parameters:
max_iter: 100
tol: 1e-9
tokenizer:
source: union
dtype: float32
out_dtype: bfloat16
---
# This model
name: Final-Lambent_Mira
merge_method: sce
base_model: ./Intermediate-Merge-3
models:
- model: ./Intermediate-Lambent_Mira
parameters:
select_topk: 77
dtype: float32
out_dtype: bfloat16
tokenizer:
source: union
Base model
Lambent/Mira-v1.22.2-27B