o
    	Ti                     @   s   d dl mZmZmZ d dlZd dlmZ ed  dZej	eddZ
edde
jd	Zed
dddZej	efejeddeZddddddggZe
jed
dd
dddZejeedZee
ed   ed d dlmZ e r|e  dS dS )    )AutoModelForCausalLMAutoTokenizerGenerationConfigN)DistributedConfigz!gpt-oss-20b-multilingual-reasonerleft)padding_sidei   F)max_new_tokens	do_sampleeos_token_idT)enable_expert_parallelauto)distributed_configtp_planz*paged-attention|ft-hf-o-c/vllm-flash-attn3)torch_dtypegeneration_configattn_implementationsystemzreasoning language: Hindi)rolecontentuserzWhat is the capital of Japan?pt)add_generation_promptreturn_tensorspaddingr   cuda)r   z--------------------------)transformersr   r   r   torchtransformers.distributedr   manual_seed
model_pathfrom_pretrained	tokenizerr
   r   
device_mapbfloat16modelmessagesapply_chat_templatetoinputsgenerateoutputsprintbatch_decodetorch.distributeddistributeddistis_initializeddestroy_process_group r2   r2   Q/home/ubuntu/.local/lib/python3.10/site-packages/examples/scripts/demo_gpt_oss.py<module>   sJ   4
