Instructions to use meihant/AnonymousModel-mht with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meihant/AnonymousModel-mht with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meihant/AnonymousModel-mht")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("meihant/AnonymousModel-mht", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meihant/AnonymousModel-mht with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meihant/AnonymousModel-mht" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meihant/AnonymousModel-mht", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/meihant/AnonymousModel-mht
- SGLang
How to use meihant/AnonymousModel-mht 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 "meihant/AnonymousModel-mht" \ --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": "meihant/AnonymousModel-mht", "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 "meihant/AnonymousModel-mht" \ --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": "meihant/AnonymousModel-mht", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use meihant/AnonymousModel-mht with Docker Model Runner:
docker model run hf.co/meihant/AnonymousModel-mht
Add models/FCP-SmolLM2-360M-20B/checkpoints/4B artifacts 0-6
Browse files- models/FCP-SmolLM2-360M-20B/checkpoints/4B/chat_template.jinja +8 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/config.json +34 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/generation_config.json +10 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/model.safetensors +3 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/tokenizer.json +0 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/tokenizer_config.json +15 -0
- models/FCP-SmolLM2-360M-20B/checkpoints/4B/training_progress.json +65 -0
models/FCP-SmolLM2-360M-20B/checkpoints/4B/chat_template.jinja
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{% if message['role'] == 'system' %}<|im_start|>system
|
| 2 |
+
{{ message['content'] }}<|im_end|>
|
| 3 |
+
{% elif message['role'] == 'user' %}<|im_start|>user
|
| 4 |
+
{{ message['content'] }}<|im_end|>
|
| 5 |
+
{% elif message['role'] == 'assistant' %}<|im_start|>assistant
|
| 6 |
+
{{ message['content'] }}<|im_end|>
|
| 7 |
+
{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
|
| 8 |
+
{% endif %}
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 0,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 960,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 2560,
|
| 15 |
+
"is_llama_config": true,
|
| 16 |
+
"max_position_embeddings": 8192,
|
| 17 |
+
"mlp_bias": false,
|
| 18 |
+
"model_type": "llama",
|
| 19 |
+
"num_attention_heads": 15,
|
| 20 |
+
"num_hidden_layers": 32,
|
| 21 |
+
"num_key_value_heads": 5,
|
| 22 |
+
"pad_token_id": 0,
|
| 23 |
+
"pretraining_tp": 1,
|
| 24 |
+
"rms_norm_eps": 1e-05,
|
| 25 |
+
"rope_interleaved": false,
|
| 26 |
+
"rope_parameters": {
|
| 27 |
+
"rope_theta": 100000,
|
| 28 |
+
"rope_type": "default"
|
| 29 |
+
},
|
| 30 |
+
"tie_word_embeddings": true,
|
| 31 |
+
"transformers_version": "5.6.2",
|
| 32 |
+
"use_cache": true,
|
| 33 |
+
"vocab_size": 49158
|
| 34 |
+
}
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 0,
|
| 8 |
+
"transformers_version": "5.6.2",
|
| 9 |
+
"use_cache": true
|
| 10 |
+
}
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1fdcb552b0cf2a575c715f666f03df85bfe6ead2f7d608da4984de885da46bd
|
| 3 |
+
size 723686432
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|endoftext|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": true,
|
| 9 |
+
"local_files_only": true,
|
| 10 |
+
"model_max_length": 8192,
|
| 11 |
+
"pad_token": "<|endoftext|>",
|
| 12 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 13 |
+
"unk_token": "<|endoftext|>",
|
| 14 |
+
"vocab_size": 49152
|
| 15 |
+
}
|
models/FCP-SmolLM2-360M-20B/checkpoints/4B/training_progress.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"passed": true,
|
| 3 |
+
"step": 19041,
|
| 4 |
+
"body_tokens": 4000000355,
|
| 5 |
+
"source_tokens": 4000000388,
|
| 6 |
+
"training_tokens": 9938886344,
|
| 7 |
+
"job_id": "2724341",
|
| 8 |
+
"checkpoint_unix_time": 1793984247.805995,
|
| 9 |
+
"training_seconds": 38792.24541464588,
|
| 10 |
+
"training_gpu_hours": 43.10249490679656,
|
| 11 |
+
"milestone": {
|
| 12 |
+
"segment": 1,
|
| 13 |
+
"end_row": 9802903,
|
| 14 |
+
"source_tokens": 4000000388,
|
| 15 |
+
"target_tokens": 4000000000,
|
| 16 |
+
"start_pack": 1218688,
|
| 17 |
+
"end_pack": 2437128
|
| 18 |
+
},
|
| 19 |
+
"config": {
|
| 20 |
+
"seed": 42,
|
| 21 |
+
"window": 4096,
|
| 22 |
+
"world_size": 4,
|
| 23 |
+
"global_batch": 128,
|
| 24 |
+
"learning_rate": 0.0005,
|
| 25 |
+
"warmup_steps": 2000,
|
| 26 |
+
"scheduler": "constant_with_warmup",
|
| 27 |
+
"adam_betas": [
|
| 28 |
+
0.9,
|
| 29 |
+
0.95
|
| 30 |
+
],
|
| 31 |
+
"adam_epsilon": 1e-08,
|
| 32 |
+
"weight_decay": 0.01,
|
| 33 |
+
"max_grad_norm": 1.0,
|
| 34 |
+
"save_body_tokens": 2000000000,
|
| 35 |
+
"initialization": "seed42 random SmolLM2-360M architecture, shared expanded vocabulary; no pretrained weights",
|
| 36 |
+
"precision": "BF16 parameters, gradients and AdamW moments; fused linear CE",
|
| 37 |
+
"loss": "global supervised-token mean, summed loss normalized before gradient accumulation",
|
| 38 |
+
"packing": "128 global 4096 BFD packs/update, 1000-record candidate buffers; independent source-fragment attention and reset positions; final partial update",
|
| 39 |
+
"data": "ten shared native-token 2B source segments, stop at 20B; source order and BFD buffers stay inside each segment",
|
| 40 |
+
"endings": "Vanilla native EOS; FCP ChatML im_end newline; historical 4096 truncation",
|
| 41 |
+
"checkpoint": "inference-only permanent at each shared source segment end; rolling recovery every 1000 steps (latest 1); 20B endpoint only",
|
| 42 |
+
"repo": "meihant/AnonymousModel-mht"
|
| 43 |
+
},
|
| 44 |
+
"code_hashes": {
|
| 45 |
+
"bfd.py": "ba37e45bfe6882b7c1747bfaafbaf55611f0cdfa2971ad16cd58d88a4009640d",
|
| 46 |
+
"config.py": "6b617d0a45048a8851b617f29608602dc7e290166749dd1551433033c44ec214",
|
| 47 |
+
"encoding.py": "3aed0431713870e35595f922f22be6a4cce123877f493de5bb1f848809683ab4",
|
| 48 |
+
"fcp_format.py": "bef4a540107f949af0e9a2149419ea05cdc4f52385b66eaed84ef25dc40a8305",
|
| 49 |
+
"gate.py": "6c862bfac6e1bd38988cd161804ff9ecb16418e08a031992dfa2f1f78a99ef37",
|
| 50 |
+
"layout.py": "f30a8a77cb97a4bf8d33248a14bbc9112c358b0a0162255d7a77abb15f8f7e2b",
|
| 51 |
+
"model.py": "f0fb8a8789fbf0cd2d7033cf813fa40dc4ebf47617f1f3b70dafa419842eeb5e",
|
| 52 |
+
"prepare_packs.py": "9111f8372105c8381c3b46cd6f31e38ba8d0c4a2c7afde28f4b5a8215c0a813e",
|
| 53 |
+
"runtime.py": "628f7ab759bc4e1047e86dbe71f143fdffa54f16ed498217e7abe82c114c1f7a",
|
| 54 |
+
"train.py": "ea3a7991373ca107118011db93c15e3c18d8f94695909ec26d686ab228e292b3",
|
| 55 |
+
"upload.py": "747a9bce54eafc35b1fa14ba5aa653908bf8f81f24b5e526bce9c947b4ef3182",
|
| 56 |
+
"validate_data.py": "f8dec33d7fc01b54b562ede8cfb87ecbf529dd68be8b48cf9147e6bd3a9324fa",
|
| 57 |
+
"verify.py": "cec4349e3b7d5adcab0f4377b0416cc87b6d810c749833e7b455dbd7e9462a97",
|
| 58 |
+
"checkpoint_files.py": "3a4cd9b1cc858e9c48dc5c00b92a1d4e86330643d03fdb9df361c6ed85788155"
|
| 59 |
+
},
|
| 60 |
+
"final": false,
|
| 61 |
+
"method": "fcp",
|
| 62 |
+
"state_signature": null,
|
| 63 |
+
"checkpoint_kind": "evaluation",
|
| 64 |
+
"resumable": false
|
| 65 |
+
}
|