Views
No views yet
<|comm|>.AutoModelForCausalLM.generate() if you want the
AR-FPA behavior. Plain Hugging Face generation will load the weights with normal
causal attention and will not insert communication tokens.ar_fpa_generate.py, which:transformers.AutoModelForCausalLM<|comm|> tokens into each AR-FPA blockpip install -r requirements-ar-fpa.txtnemo_automodel / Automodel repository is required for inference. The
standalone AR-FPA model definition and kernel are included in
modeling_qwen3_ar_fpa.py.1CUDA_VISIBLE_DEVICES=0 python ar_fpa_generate.py \
2 --model-dir /path/to/qwen_ar_fpa_cpt_inference_package \
3 --prompt "Explain why antibiotics do not work against viral infections." \
4 --max-new-tokens 1281from transformers import AutoModelForCausalLM, AutoTokenizer
2
3path = "/path/to/qwen_ar_fpa_cpt_inference_package"
4tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(path, trust_remote_code=True, torch_dtype="auto").cuda()ar_fpa_generate.py provides that wrapper.1{
2 "attention": "ar_fpa",
3 "block_size": 128,
4 "num_comm_tokens": 4,
5 "comm_token": "<|comm|>",
6 "max_seq_length": 4096
7}<|comm|> at id 151669. The checkpoint embedding
matrix is padded to vocab size 151936; this is expected.