Run this model with HF Jobs

Run zai-org/chatglm-6b 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/chatglm-6b. 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/chatglm-6b 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.

利用chatglm6b进行embedding提取,输入input_ids提取出来的embedding全为0

#63
by XiaoHangjia - opened

使用方法:

tokenizer = ChatGLMTokenizer.from_pretrained(path, trust_remote_code=True)
glm_model = ChatGLMForConditionalGeneration.from_pretrained(path, trust_remote_code=True).half()

input_ids = tokenizer([prompt], return_tensors='pt', padding=True).input_ids
emb = glm_model.transformer.word_embeddings(input_ids.to("cuda"))

emb的值为0

问题已解决,版本问题

Sign up or log in to comment