Text Generation
Transformers
Safetensors
English
glm4_moe_lite
text-generation-inference
unsloth
conversational
Instructions to use weifar/HKT_GLM_4_7_flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use weifar/HKT_GLM_4_7_flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="weifar/HKT_GLM_4_7_flash") 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("weifar/HKT_GLM_4_7_flash") model = AutoModelForCausalLM.from_pretrained("weifar/HKT_GLM_4_7_flash", 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 weifar/HKT_GLM_4_7_flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "weifar/HKT_GLM_4_7_flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "weifar/HKT_GLM_4_7_flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/weifar/HKT_GLM_4_7_flash
- SGLang
How to use weifar/HKT_GLM_4_7_flash 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 "weifar/HKT_GLM_4_7_flash" \ --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": "weifar/HKT_GLM_4_7_flash", "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 "weifar/HKT_GLM_4_7_flash" \ --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": "weifar/HKT_GLM_4_7_flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use weifar/HKT_GLM_4_7_flash with Docker Model Runner:
docker model run hf.co/weifar/HKT_GLM_4_7_flash
Commit History
-
(Trained with Unsloth)
Verified signatured8b812b -
(Trained with Unsloth)
Verified signaturef646364 -
(Trained with Unsloth)
Verified signature1a9c5fa -
(Trained with Unsloth)
Verified signature98be14d -
(Trained with Unsloth)
Verified signature49ee970 -
(Trained with Unsloth)
Verified signature1467d9f -
(Trained with Unsloth)
Verified signature89ad92f -
(Trained with Unsloth)
Verified signature292b9af -
(Trained with Unsloth)
Verified signaturee896f54 -
(Trained with Unsloth)
Verified signatureb17bbc4 -
(Trained with Unsloth)
Verified signature9dfea61 -
(Trained with Unsloth)
Verified signature9eeb0e8 -
(Trained with Unsloth)
Verified signature0697d27 -
(Trained with Unsloth)
Verified signaturea23ddca -
(Trained with Unsloth)
Verified signatureaff5567 -
(Trained with Unsloth)
Verified signature81ecc1d -
(Trained with Unsloth)
Verified signatureb510d32 -
(Trained with Unsloth)
Verified signature256139f -
(Trained with Unsloth)
Verified signature28d22a4 -
(Trained with Unsloth)
Verified signature95acb53 -
(Trained with Unsloth)
Verified signaturec1ef394 -
(Trained with Unsloth)
Verified signaturef431323 -
(Trained with Unsloth)
Verified signature7829896 -
(Trained with Unsloth)
Verified signatureb75e619 -
(Trained with Unsloth)
Verified signature9ebfdc8 -
(Trained with Unsloth)
Verified signaturef0235f0 -
(Trained with Unsloth)
Verified signatureceb72bd -
(Trained with Unsloth)
Verified signaturef425163 -
(Trained with Unsloth)
Verified signature31d7f79 -
(Trained with Unsloth)
Verified signature872af25 -
(Trained with Unsloth)
Verified signaturebe539b9 -
(Trained with Unsloth)
Verified signatureb8a0ebe -
(Trained with Unsloth)
Verified signature608fc58 -
(Trained with Unsloth)
Verified signatured9ea72e -
(Trained with Unsloth)
Verified signatured931d3d -
(Trained with Unsloth)
Verified signaturebc7ee0a -
(Trained with Unsloth)
Verified signature7c9f20b -
(Trained with Unsloth)
Verified signatured7157f6 -
(Trained with Unsloth)
Verified signature638c3d5 -
(Trained with Unsloth)
Verified signature30cd72b -
(Trained with Unsloth)
Verified signature6b384c9 -
(Trained with Unsloth)
Verified signature8a33949 -
(Trained with Unsloth)
Verified signature357ae4a -
(Trained with Unsloth)
Verified signature2a7a5e4 -
(Trained with Unsloth)
Verified signature1876947 -
(Trained with Unsloth)
Verified signaturecffd000 -
(Trained with Unsloth)
Verified signature20c0582 -
(Trained with Unsloth)
Verified signature5559360 -
(Trained with Unsloth)
Verified signatureb3763cb -
(Trained with Unsloth)
Verified signatureb83f00c