Text Generation
Transformers
Safetensors
scrapegoat
dual-track
parallel-attention
Mixture of Experts
kda
quantile-balancing
Instructions to use scrapegoat/Scrapegoat-Tiny-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use scrapegoat/Scrapegoat-Tiny-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="scrapegoat/Scrapegoat-Tiny-Coder")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("scrapegoat/Scrapegoat-Tiny-Coder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use scrapegoat/Scrapegoat-Tiny-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "scrapegoat/Scrapegoat-Tiny-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "scrapegoat/Scrapegoat-Tiny-Coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/scrapegoat/Scrapegoat-Tiny-Coder
- SGLang
How to use scrapegoat/Scrapegoat-Tiny-Coder 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 "scrapegoat/Scrapegoat-Tiny-Coder" \ --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": "scrapegoat/Scrapegoat-Tiny-Coder", "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 "scrapegoat/Scrapegoat-Tiny-Coder" \ --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": "scrapegoat/Scrapegoat-Tiny-Coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use scrapegoat/Scrapegoat-Tiny-Coder with Docker Model Runner:
docker model run hf.co/scrapegoat/Scrapegoat-Tiny-Coder
File size: 1,782 Bytes
5216a17 | 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 | {
"_name_or_path": "ScrapeGoat-v1",
"model_type": "scrapegoat",
"vocab_size": 248320,
"hidden_size": 4096,
"num_hidden_layers": 81,
"hidden_act": "silu",
"max_position_embeddings": 262144,
"initializer_range": 0.02,
"rms_norm_eps": 1e-06,
"use_cache": true,
"pad_token_id": 0,
"bos_token_id": 1,
"eos_token_id": 2,
"tie_word_embeddings": false,
"rope_theta": 10000.0,
"rope_scaling": null,
"attention_bias": false,
"attention_dropout": 0.0,
"track_a_num_attention_heads": 32,
"track_a_num_key_value_heads": 2,
"track_a_head_dim": 256,
"track_a_num_experts": 512,
"track_a_moe_intermediate_size": 1024,
"track_b_num_attention_heads": 64,
"track_b_num_key_value_heads": 8,
"track_b_head_dim": 128,
"track_b_num_experts": 192,
"num_experts": 704,
"track_b_moe_intermediate_size": 1536,
"track_b_intermediate_size": 13312,
"num_experts_per_tok": 8,
"output_router_logits": false,
"router_aux_loss_coef": 0.001,
"kda_head_dim": 256,
"kda_conv_kernel": 3,
"kda_gqa_layers": [
0,
4,
8,
12,
16,
20,
24,
28,
32,
36,
40,
44,
48,
52,
56,
60,
64,
68,
72,
76,
80
],
"quantile_balancing": true,
"qb_iterations": 5,
"attn_residual": false,
"attn_res_blocks": 8,
"stable_moe_stage": 1,
"mom_enabled": true,
"mom_num_memories": 4,
"mom_active_memories": 2,
"mom_shared_memory": true,
"mom_load_balancing": true,
"stable_moe_r3": false,
"stable_moe_r3_cache": true,
"dspark_block_size": 6,
"dspark_noise_token_id": 0,
"dspark_target_layer_ids": [],
"dspark_markov_rank": 256,
"num_attention_heads": 32,
"num_key_value_heads": 8,
"architectures": [
"ScrapeGoatForCausalLM"
],
"return_dict": true
} |