Instructions to use hf-internal-testing/tiny-random-step3p7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-step3p7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hf-internal-testing/tiny-random-step3p7")# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("hf-internal-testing/tiny-random-step3p7", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hf-internal-testing/tiny-random-step3p7 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hf-internal-testing/tiny-random-step3p7" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/tiny-random-step3p7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hf-internal-testing/tiny-random-step3p7
- SGLang
How to use hf-internal-testing/tiny-random-step3p7 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 "hf-internal-testing/tiny-random-step3p7" \ --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": "hf-internal-testing/tiny-random-step3p7", "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 "hf-internal-testing/tiny-random-step3p7" \ --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": "hf-internal-testing/tiny-random-step3p7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hf-internal-testing/tiny-random-step3p7 with Docker Model Runner:
docker model run hf.co/hf-internal-testing/tiny-random-step3p7
File size: 2,813 Bytes
87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 7ce4733 87ec910 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | {
"architectures": [
"Step3p7ForConditionalGeneration"
],
"dtype": "float32",
"image_token_id": 63,
"model_type": "step3p7",
"projector_bias": false,
"text_config": {
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 0,
"eos_token_id": 2,
"gating": true,
"head_dim": 8,
"hidden_act": "silu",
"hidden_size": 32,
"initializer_range": 0.02,
"intermediate_size": 88,
"layer_types": [
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention"
],
"max_position_embeddings": 262144,
"mlp_bias": false,
"mlp_layer_types": [
"dense",
"dense",
"sparse",
"sparse",
"sparse",
"sparse",
"sparse",
"sparse"
],
"model_type": "step3p5",
"moe_intermediate_size": 10,
"moe_router_scaling_factor": 3.0,
"n_routed_experts": 8,
"num_attention_heads": 8,
"num_attention_heads_per_layer": [
8,
12,
12,
12,
8,
12,
12,
12
],
"num_experts_per_tok": 2,
"num_hidden_layers": 8,
"num_key_value_heads": 2,
"num_nextn_predict_layers": 0,
"num_sliding_attention_heads": 12,
"pad_token_id": 1,
"query_pre_attn_scalar": 8,
"rms_norm_eps": 1e-05,
"rope_parameters": {
"full_attention": {
"factor": 2.0,
"high_freq_factor": 32.0,
"low_freq_factor": 1.0,
"original_max_position_embeddings": 131072,
"partial_rotary_factor": 0.5,
"rope_theta": 5000000.0,
"rope_type": "llama3"
},
"sliding_attention": {
"partial_rotary_factor": 1.0,
"rope_theta": 10000.0,
"rope_type": "default"
}
},
"share_expert_dim": 10,
"sliding_window": 6,
"swiglu_limits": [
null,
null,
null,
null,
null,
null,
7,
7
],
"swiglu_limits_shared": [
null,
null,
null,
null,
null,
null,
16,
16
],
"tie_word_embeddings": false,
"use_cache": true,
"vocab_size": 64
},
"transformers_version": "5.15.0.dev0",
"vision_config": {
"attention_dropout": 0.0,
"hidden_act": "quick_gelu",
"hidden_size": 16,
"image_size": 16,
"intermediate_size": 93,
"layer_norm_eps": 1e-05,
"layer_scale_init_value": 0.1,
"max_position_embeddings": 16,
"mlp_ratio": 5.833333333333333,
"model_type": "step3p5_vision",
"num_attention_heads": 4,
"num_channels": 3,
"num_hidden_layers": 2,
"patch_size": 4,
"rope_parameters": {
"rope_theta": 10000.0,
"rope_type": "default"
}
}
}
|