Instructions to use zai-org/CogView4-6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zai-org/CogView4-6B with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zai-org/CogView4-6B", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
| { | |
| "_name_or_path": "THUDM/glm-4-9b-hf", | |
| "architectures": [ | |
| "GlmModel" | |
| ], | |
| "attention_bias": true, | |
| "attention_dropout": 0.0, | |
| "eos_token_id": [ | |
| 151329, | |
| 151336, | |
| 151338 | |
| ], | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 13696, | |
| "max_position_embeddings": 8192, | |
| "model_type": "glm", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 40, | |
| "num_key_value_heads": 2, | |
| "pad_token_id": 151329, | |
| "partial_rotary_factor": 0.5, | |
| "rms_norm_eps": 1.5625e-07, | |
| "rope_theta": 10000.0, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.49.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 151552 | |
| } | |