Instructions to use yujiepan/hymba-tiny-random with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yujiepan/hymba-tiny-random with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yujiepan/hymba-tiny-random", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("yujiepan/hymba-tiny-random", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yujiepan/hymba-tiny-random with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yujiepan/hymba-tiny-random" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yujiepan/hymba-tiny-random", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yujiepan/hymba-tiny-random
- SGLang
How to use yujiepan/hymba-tiny-random 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 "yujiepan/hymba-tiny-random" \ --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": "yujiepan/hymba-tiny-random", "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 "yujiepan/hymba-tiny-random" \ --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": "yujiepan/hymba-tiny-random", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yujiepan/hymba-tiny-random with Docker Model Runner:
docker model run hf.co/yujiepan/hymba-tiny-random
| { | |
| "_name_or_path": "nvidia/Hymba-1.5B-Instruct", | |
| "architectures": [ | |
| "HymbaForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attn_hidden_size": -1, | |
| "attn_implementation": "flex", | |
| "attn_implementation_new": "flex", | |
| "auto_map": { | |
| "AutoConfig": "nvidia/Hymba-1.5B-Instruct--configuration_hymba.HymbaConfig", | |
| "AutoModelForCausalLM": "nvidia/Hymba-1.5B-Instruct--modeling_hymba.HymbaForCausalLM" | |
| }, | |
| "bos_token_id": 1, | |
| "calc_logits_for_entire_prompt": false, | |
| "conv_dim": { | |
| "0": 32, | |
| "1": 32, | |
| "2": 32 | |
| }, | |
| "eos_token_id": 2, | |
| "global_attn_idx": [ | |
| 0, | |
| 15, | |
| 31 | |
| ], | |
| "hidden_act": "silu", | |
| "hidden_size": 16, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 32, | |
| "kq_head_dim": -1, | |
| "kq_norm": "none", | |
| "kv_reuse_every_i_layer": -1, | |
| "kv_reuse_group": [ | |
| [ | |
| 1, | |
| 2 | |
| ], | |
| [ | |
| 3, | |
| 4 | |
| ], | |
| [ | |
| 5, | |
| 6 | |
| ], | |
| [ | |
| 7, | |
| 8 | |
| ], | |
| [ | |
| 9, | |
| 10 | |
| ], | |
| [ | |
| 11, | |
| 12 | |
| ], | |
| [ | |
| 13, | |
| 14 | |
| ], | |
| [ | |
| 16, | |
| 17, | |
| 18 | |
| ], | |
| [ | |
| 19, | |
| 20 | |
| ], | |
| [ | |
| 21, | |
| 22 | |
| ], | |
| [ | |
| 23, | |
| 24 | |
| ], | |
| [ | |
| 25, | |
| 26 | |
| ], | |
| [ | |
| 27, | |
| 28 | |
| ], | |
| [ | |
| 29, | |
| 30 | |
| ] | |
| ], | |
| "kv_weight_reuse": false, | |
| "layer_type": [ | |
| "h", | |
| "h", | |
| "h" | |
| ], | |
| "mamba_conv_bias": true, | |
| "mamba_d_conv": 4, | |
| "mamba_d_state": 16, | |
| "mamba_dt_rank": 100, | |
| "mamba_expand": 2, | |
| "mamba_inner_layernorms": true, | |
| "mamba_proj_bias": false, | |
| "max_position_embeddings": 8192, | |
| "memory_tokens_interspersed_every": 0, | |
| "mlp_hidden_act": "silu", | |
| "model_type": "hymba", | |
| "num_attention_heads": 2, | |
| "num_experts": 1, | |
| "num_experts_per_tok": 1, | |
| "num_hidden_layers": 3, | |
| "num_key_value_heads": 1, | |
| "num_mamba": 1, | |
| "num_memory_tokens": 128, | |
| "orig_max_position_embeddings": 2048, | |
| "output_router_logits": false, | |
| "pad_token_id": 0, | |
| "rms_norm_eps": 1e-06, | |
| "rope": true, | |
| "rope_theta": 10000.0, | |
| "rope_type": "ntk", | |
| "router_aux_loss_coef": 0.001, | |
| "seq_length": 8192, | |
| "sliding_window": 1024, | |
| "tie_word_embeddings": true, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.46.3", | |
| "use_cache": false, | |
| "use_mamba_kernels": true, | |
| "v_head_dim": 16, | |
| "vocab_size": 32001 | |
| } | |