Run this model with HF Jobs
Run whitecircle/GLM-4.7-Flash-Coder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/whitecircle/GLM-4.7-Flash-Coder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/whitecircle/GLM-4.7-Flash-Coder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/whitecircle/GLM-4.7-Flash-Coder. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/whitecircle/GLM-4.7-Flash-Coder. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use whitecircle/GLM-4.7-Flash-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use whitecircle/GLM-4.7-Flash-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="whitecircle/GLM-4.7-Flash-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("whitecircle/GLM-4.7-Flash-Coder") model = AutoModelForCausalLM.from_pretrained("whitecircle/GLM-4.7-Flash-Coder", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use whitecircle/GLM-4.7-Flash-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "whitecircle/GLM-4.7-Flash-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whitecircle/GLM-4.7-Flash-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/whitecircle/GLM-4.7-Flash-Coder
- SGLang
How to use whitecircle/GLM-4.7-Flash-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 "whitecircle/GLM-4.7-Flash-Coder" \ --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": "whitecircle/GLM-4.7-Flash-Coder", "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 "whitecircle/GLM-4.7-Flash-Coder" \ --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": "whitecircle/GLM-4.7-Flash-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use whitecircle/GLM-4.7-Flash-Coder with Docker Model Runner:
docker model run hf.co/whitecircle/GLM-4.7-Flash-Coder
Add files using upload-large-folder tool
Browse filesFiles changed (19)
- .gitattributes+1
- chat_template.jinjaAdded+86
- config.jsonAdded+45
- generation_config.jsonAdded+11
- model-00001-of-00012.safetensorsAdded+3
- model-00002-of-00012.safetensorsAdded+3
- model-00003-of-00012.safetensorsAdded+3
- model-00004-of-00012.safetensorsAdded+3
- model-00005-of-00012.safetensorsAdded+3
- model-00006-of-00012.safetensorsAdded+3
- model-00007-of-00012.safetensorsAdded+3
- model-00008-of-00012.safetensorsAdded+3
- model-00009-of-00012.safetensorsAdded+3
- model-00010-of-00012.safetensorsAdded+3
- model-00011-of-00012.safetensorsAdded+3
- model-00012-of-00012.safetensorsAdded+3
- model.safetensors.index.jsonAdded
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+321
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586[gMASK]<sop>{%- if tools -%}<|system|># Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:<tools>{% for tool in tools %}{{ tool | tojson(ensure_ascii=False) }}{% endfor %}</tools>
For each function call, output the function name and arguments within the following XML format:<tool_call>{function-name}<arg_key>{arg-key-1}</arg_key><arg_value>{arg-value-1}</arg_value><arg_key>{arg-key-2}</arg_key><arg_value>{arg-value-2}</arg_value>...</tool_call>{%- endif -%}{%- macro visible_text(content) -%} {%- if content is string -%} {{- content }} {%- elif content is iterable and content is not mapping -%} {%- for item in content -%} {%- if item is mapping and item.type == 'text' -%} {{- item.text }} {%- elif item is string -%} {{- item }} {%- endif -%} {%- endfor -%} {%- else -%} {{- content }} {%- endif -%}{%- endmacro -%}{%- set ns = namespace(last_user_index=-1) %}{%- for m in messages %} {%- if m.role == 'user' %} {% set ns.last_user_index = loop.index0 -%} {%- endif %}{%- endfor %}{% for m in messages %}{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}{%- elif m.role == 'assistant' -%}<|assistant|>{%- set reasoning_content = '' %}{%- set content = visible_text(m.content) %}{%- if m.reasoning_content is string %} {%- set reasoning_content = m.reasoning_content %}{%- else %} {%- if '</think>' in content %} {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %} {%- set content = content.split('</think>')[-1].lstrip('\n') %} {%- endif %}{%- endif %}{%- if ((clear_thinking is defined and not clear_thinking) or loop.index0 > ns.last_user_index) and reasoning_content -%}{{ '<think>' + reasoning_content.strip() + '</think>'}}{%- else -%}{{ '</think>' }}{%- endif -%}{%- if content.strip() -%}{{ content.strip() }}{%- endif -%}{% if m.tool_calls %}{% for tc in m.tool_calls %}{%- if tc.function %} {%- set tc = tc.function %}{%- endif %}{{- '<tool_call>' + tc.name -}}{% set _args = tc.arguments %}{% for k, v in _args.items() %}<arg_key>{{ k }}</arg_key><arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>{% endfor %}</tool_call>{% endfor %}{% endif %}{%- elif m.role == 'tool' -%}{%- if m.content is string -%}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} {{- '<|observation|>' }}{%- endif %}{{- '<tool_response>' }}{{- m.content }}{{- '</tool_response>' }}{%- else -%}<|observation|>{% for tr in m.content %}<tool_response>{{ tr.output if tr.output is defined else tr }}</tool_response>{% endfor -%}{% endif -%}{%- elif m.role == 'system' -%}<|system|>{{ visible_text(m.content) }}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%} <|assistant|>{{- '</think>' if (enable_thinking is defined and not enable_thinking) else '<think>' -}}{%- endif -%}123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "architectures": [ "Glm4MoeLiteForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "pad_token_id": 154820, "eos_token_id": [ 154820, 154827, 154829 ], "hidden_act": "silu", "hidden_size": 2048, "intermediate_size": 10240, "max_position_embeddings": 202752, "model_type": "glm4_moe_lite", "moe_intermediate_size": 1536, "topk_method": "noaux_tc", "norm_topk_prob": true, "num_attention_heads": 20, "n_group": 1, "topk_group": 1, "n_routed_experts": 64, "n_shared_experts": 1, "routed_scaling_factor": 1.8, "num_experts_per_tok": 4, "first_k_dense_replace": 1, "num_hidden_layers": 47, "num_key_value_heads": 20, "num_nextn_predict_layers": 1, "partial_rotary_factor": 1.0, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 1000000, "tie_word_embeddings": false, "dtype": "bfloat16", "transformers_version": "5.0.0rc0", "q_lora_rank": 768, "kv_lora_rank": 512, "qk_nope_head_dim": 192, "qk_rope_head_dim": 64, "v_head_dim": 256, "vocab_size": 154880}1234567891011{ "_from_model_config": true, "eos_token_id": [ 154820, 154827, 154829 ], "pad_token_id": 154820, "temperature": 1.0, "transformers_version": "5.0.0.dev0"}123version https://git-lfs.github.com/spec/v1oid sha256:d541a8d782e8b2f5e13fe3b0d66fb7f375bc609185eaab548eef8ff5bea0c202size 5365900264123version https://git-lfs.github.com/spec/v1oid sha256:c245ab54d96151343a7a9d91af18f67627f12e968ddc37ac2dbdf4d183c21916size 5367767600123version https://git-lfs.github.com/spec/v1oid sha256:7c6310738f45cd62ee8b0a5012e91ee81760a19510e49681bd04862f8c777216size 5368030432123version https://git-lfs.github.com/spec/v1oid sha256:7f55196f984c088319ae8c62972c9a384825b3ce5d1b63a9ee1267f2b7eaf27asize 5367768448123version https://git-lfs.github.com/spec/v1oid sha256:27939ee0f74f6cda9dc406ca17d398d28367e7e2a3c43071f7989fe0f338aa24size 5368030976123version https://git-lfs.github.com/spec/v1oid sha256:39fe3871e731e89d568918f2eb8e1143d9fdc75eff4e340e27bbbbfead5393ecsize 5367768496123version https://git-lfs.github.com/spec/v1oid sha256:1d14c297bf601c37a3a42dc843e20f43df170ef47c30fbc4db4805c75d7c8f44size 5367768464123version https://git-lfs.github.com/spec/v1oid sha256:5423341ab25020e9910f6f637732ebb8e576fd850adeaf31431a9b5c57cd2a27size 5368031000123version https://git-lfs.github.com/spec/v1oid sha256:e0e51962407c70d61affdfb1f15c95b99c414c8954246dfdf0d59513bd831c03size 5367768472123version https://git-lfs.github.com/spec/v1oid sha256:4df1f5fc6b798a7c1da70fb84b45c67fa166bbc44b588da03d459cdfb15471ecsize 5367768464123version https://git-lfs.github.com/spec/v1oid sha256:51f1cc63c22eea55e49fab42c8ff4229aad1d2a8fd347e8af3e63c68cc5c5016size 5368031024123version https://git-lfs.github.com/spec/v1oid sha256:11d8e314878dd067fe019588d79d9050407fc4ccdd71ff728a60c70eaeb91c14size 843350896123version https://git-lfs.github.com/spec/v1oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82dsize 20217442123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321{ "added_tokens_decoder": { "154820": { "content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154821": { "content": "[MASK]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154822": { "content": "[gMASK]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154823": { "content": "[sMASK]", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154824": { "content": "<sop>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154825": { "content": "<eop>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154826": { "content": "<|system|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154827": { "content": "<|user|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154828": { "content": "<|assistant|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154829": { "content": "<|observation|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154830": { "content": "<|begin_of_image|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154831": { "content": "<|end_of_image|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154832": { "content": "<|begin_of_video|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154833": { "content": "<|end_of_video|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154834": { "content": "<|begin_of_audio|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154835": { "content": "<|end_of_audio|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154836": { "content": "<|begin_of_transcription|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154837": { "content": "<|end_of_transcription|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "154838": { "content": "<|code_prefix|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154839": { "content": "<|code_middle|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154840": { "content": "<|code_suffix|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154841": { "content": "<think>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154842": { "content": "</think>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154843": { "content": "<tool_call>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154844": { "content": "</tool_call>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154845": { "content": "<tool_response>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154846": { "content": "</tool_response>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154847": { "content": "<arg_key>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154848": { "content": "</arg_key>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154849": { "content": "<arg_value>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154850": { "content": "</arg_value>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154851": { "content": "/nothink", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154852": { "content": "<|begin_of_box|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154853": { "content": "<|end_of_box|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154854": { "content": "<|image|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false }, "154855": { "content": "<|video|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": false } }, "additional_special_tokens": [ "<|endoftext|>", "[MASK]", "[gMASK]", "[sMASK]", "<sop>", "<eop>", "<|system|>", "<|user|>", "<|assistant|>", "<|observation|>", "<|begin_of_image|>", "<|end_of_image|>", "<|begin_of_video|>", "<|end_of_video|>", "<|begin_of_audio|>", "<|end_of_audio|>", "<|begin_of_transcription|>", "<|end_of_transcription|>" ], "clean_up_tokenization_spaces": false, "do_lower_case": false, "eos_token": "<|endoftext|>", "extra_special_tokens": {}, "model_max_length": 128000, "pad_token": "<|endoftext|>", "padding_side": "left", "remove_space": false, "tokenizer_class": "PreTrainedTokenizer"}.gitattributes+1
chat_template.jinjaAdded+86
config.jsonAdded+45
generation_config.jsonAdded+11
model-00001-of-00012.safetensorsAdded+3
model-00002-of-00012.safetensorsAdded+3
model-00003-of-00012.safetensorsAdded+3
model-00004-of-00012.safetensorsAdded+3
model-00005-of-00012.safetensorsAdded+3
model-00006-of-00012.safetensorsAdded+3
model-00007-of-00012.safetensorsAdded+3
model-00008-of-00012.safetensorsAdded+3
model-00009-of-00012.safetensorsAdded+3
model-00010-of-00012.safetensorsAdded+3
model-00011-of-00012.safetensorsAdded+3
model-00012-of-00012.safetensorsAdded+3
model.safetensors.index.jsonAdded
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+321