Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLM-4 Series #24

Open
wants to merge 3 commits into
base: v0.1.0
Choose a base branch
from
Open

GLM-4 Series #24

wants to merge 3 commits into from

Conversation

hhhhzl
Copy link

@hhhhzl hhhhzl commented Feb 14, 2025

Add GLM-4

File Changed:

  • add glm.py and glm_layer.py
  • add GLM4 to AutoModel
  • add GLM4 template to templates.py (double checked it's the correct template)

Test:

  • python generate.py --model THUDM/glm-4-9b-chat --template glm4
  • hf_result: python hf_generate.py --model THUDM/glm-4-9b-chat

Challenges/Questions:

  • I got different results when I changed AutoModelForCausalLM to GlmForCausalLM. However, I can get a uniform unreadable result if I set top_k, top_p, and temperature = 0 with GlmForCausalLM. My intuition is that this is because GlmForCausalLM has slightly different settings for a GLM-like model.
  • I also got different unreadable outputs from generate.py, which makes it difficult to compare them due to challenge 1.
  • Do we need to pass trust-remote-code = true in for GLMs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant