microsoft / DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
https://www.deepspeed.ai/
Apache License 2.0
34.42k stars 4.02k forks source link

[BUG] The text generated by the hybrid engine does not meet expectations, the model is GPTNeoX #3453

Open sunhaohai opened 1 year ago

sunhaohai commented 1 year ago

huggingface model config: { "activation_function": "gelu", "architectures": [ "GPTNeoXForCausalLM" ], "bos_token_id": 0, "eos_token_id": 2, "hidden_act": "gelu", "hidden_size": 1536, "initializer_range": 0.02, "intermediate_size": 6144, "layer_norm_eps": 1e-05, "max_position_embeddings": 4096, "model_type": "gpt_neox", "num_attention_heads": 12, "num_hidden_layers": 12, "rotary_emb_base": 10000, "rotary_pct": 1, "tie_word_embeddings": false, "transformers_version": "4.28.1", "use_cache": true, "use_parallel_residual": false, "vocab_size": 30336 }

When hybrid_engine.enabled=False, the response is fine. The implementation of GPTNeoX Container in hybrid_engine looks inconsistent with huggingface.

puyuanOT commented 1 year ago

Got the same issue.

laoda513 commented 1 year ago

https://github.com/microsoft/DeepSpeedExamples/issues/503

seems the same with this. I provided some detailed info