Instructions to use nikita-savelyev-cerebras/tiny-random-muse-spark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nikita-savelyev-cerebras/tiny-random-muse-spark with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nikita-savelyev-cerebras/tiny-random-muse-spark")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("nikita-savelyev-cerebras/tiny-random-muse-spark") model = AutoModelForMultimodalLM.from_pretrained("nikita-savelyev-cerebras/tiny-random-muse-spark", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nikita-savelyev-cerebras/tiny-random-muse-spark with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nikita-savelyev-cerebras/tiny-random-muse-spark" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nikita-savelyev-cerebras/tiny-random-muse-spark", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nikita-savelyev-cerebras/tiny-random-muse-spark
- SGLang
How to use nikita-savelyev-cerebras/tiny-random-muse-spark 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 "nikita-savelyev-cerebras/tiny-random-muse-spark" \ --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": "nikita-savelyev-cerebras/tiny-random-muse-spark", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "nikita-savelyev-cerebras/tiny-random-muse-spark" \ --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": "nikita-savelyev-cerebras/tiny-random-muse-spark", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nikita-savelyev-cerebras/tiny-random-muse-spark with Docker Model Runner:
docker model run hf.co/nikita-savelyev-cerebras/tiny-random-muse-spark
Tiny random Muse Spark
A small, randomly initialized Muse Spark checkpoint for testing model loading, blockwise execution, and multimodal input handling. All floating-point weights are stored in FP32. It has no trained language, vision, or audio capability.
Architecture
- Six text decoder layers with hidden size 8, two attention heads, and one KV head.
- Full-attention layers without RoPE at indices 1 and 5; sliding-window attention with RoPE in the other text layers. The sliding window is 16 tokens.
- Sixteen routed experts per text layer, with four experts selected per token.
- A two-layer vision tower with hidden size 32, plus the vision adapter and projection.
- A four-stage audio tower with hidden sizes
[8, 8, 8, 8]and one block per stage. - The native vocabulary of 202,048 tokens and native output multiplier and logit softcap.
Initialization uses torch.manual_seed(0). After model construction, router gate
weights and parameters whose names contain experts are sampled from a normal
distribution with mean 0 and standard deviation 0.5 to exercise expert routing.
Loading
Requires a Transformers release with native Muse Spark support (>=5.20). No remote Python model code is needed. This repository contains model weights and configuration; it does not include a tokenizer or processor.
import torch
from transformers import MuseSparkForConditionalGeneration
model = MuseSparkForConditionalGeneration.from_pretrained(
"nikita-savelyev-cerebras/tiny-random-muse-spark",
dtype=torch.float32,
attn_implementation="eager",
).eval()
torch.manual_seed(1)
input_ids = torch.randint(1000, 20000, (1, 48))
with torch.inference_mode():
logits = model(input_ids=input_ids, use_cache=False).logits
Use sequences longer than 16 tokens when testing the distinction between full
and sliding attention. FP32 storage supports FP32 reference calculations;
the same checkpoint can be loaded with dtype=torch.bfloat16.
Generated with PyTorch 2.13.0 and Transformers 5.20.2.
To regenerate the checkpoint with those versions, run the included script:
python create_model.py ./tiny-random-muse-spark
- Downloads last month
- -