




from arguments import InitializationArguments

from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, HfArgumentParser


# Configuration
_UpperCAmelCase	:						Any			=     HfArgumentParser(InitializationArguments)
_UpperCAmelCase	:						Union[str, Any]			=     parser.parse_args()

# Load codeparrot tokenizer trained for Python code tokenization
_UpperCAmelCase	:						Any			=     AutoTokenizer.from_pretrained(args.tokenizer_name)

# Config: "scale_attn_by_layer_idx" and "reorder_and_upcast_attn" are Mistral stability tweaks
_UpperCAmelCase	:						Dict			=     {
    "vocab_size": len(tokenizer),
    "scale_attn_by_inverse_layer_idx": True,
    "reorder_and_upcast_attn": True,
}

# Load model config (GPT-2 large in this case)
_UpperCAmelCase	:						Union[str, Any]			=     AutoConfig.from_pretrained(args.config_name, **config_kwargs)

# Initialize new model with config
_UpperCAmelCase	:						Optional[Any]			=     AutoModelForCausalLM.from_config(config)

# Save model to the hub
model.save_pretrained(args.model_name, push_to_hub=args.push_to_hub)









def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase   ):
  return int((input_a, input_a).count(0   ) != 0   )



def       UpperCAmelCase__  (     ):
  assert nand_gate(0,			0   ) == 1
  assert nand_gate(0,			1   ) == 1
  assert nand_gate(1,			0   ) == 1
  assert nand_gate(1,			1   ) == 0


if __name__ == "__main__":
     print(nand_gate(0, 0))
     print(nand_gate(0, 1))
     print(nand_gate(1, 0))
     print(nand_gate(1, 1))



