Views
No views yet
generate from the hub.ValueError: Missing requirements for `transformers-community/custom_generate_bad_requirements`:
foo (installed: None)
bar==0.0.0 (installed: None)
torch>=99.0 (installed: 2.6.0+cu126)Qwen/Qwen2.5-0.5B-Instructtransformer LLM/VLM trained for causal language modeling.left_padding (int, optional): number of padding tokens to add before the provided input1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
4model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct", device_map="auto")
5
6inputs = tokenizer(["The quick brown"], return_tensors="pt").to(model.device)
7gen_out = model.generate(**inputs, custom_generate="transformers-community/custom_generate_bad_requirements", trust_remote_code=True)
8# You should get an exception regarding missing requirements