Run this model with HF Jobs

Run zai-org/glm-4-9b-chat 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 to fine-tune https://huggingface.co/zai-org/glm-4-9b-chat. 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/zai-org/glm-4-9b-chat 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.

使用 vLLM 部署,无法使用 outlines 做 guided decoding

#75
by wangm23456 - opened

错误和这个一样:https://github.com/vllm-project/vllm/issues/3778

错误在 https://github.com/vllm-project/vllm/blob/9606c7197df073e373ab9e716a62dd4c35398865/vllm/model_executor/guided_decoding/outlines_logits_processors.py#L189
如果像下面把 token 先转成str,会有新的错误: 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte

def convert_token_to_string(token: str) -> str:
        from transformers.file_utils import SPIECE_UNDERLINE

        if isinstance(token, bytes):
            token = token.decode("utf-8")

        string = tokenizer.convert_tokens_to_string([token])

        print("=" * 16 + f"token, string : {token}, {string}, {SPIECE_UNDERLINE}")

        # A hack to handle missing spaces to HF's Llama tokenizers
        if token.startswith(SPIECE_UNDERLINE) or token == "<0x20>":
            return " " + string

        return string

same error

same error, any solutions?

If you're looking for an easy way to access this model via API, you can use Crazyrouter — it provides an OpenAI-compatible endpoint for 600+ models including this one. Just pip install openai and change the base URL.

Sign up or log in to comment