相关试题
单选题 在Transformer模型中,假设d_model=512,在decoder的cross-attention中,query来自decoder,key/value来自encoder。训练时batch_size=8,max_seq_len=128。问:cross-attention的QK^T矩阵形状是多少?
单选题 LoRA微调时,原始权重矩阵W ∈ R^{4096×4096},设置rank=8,alpha=16。训练时前向传播计算h = Wx + (B A)x。问:可训练参数量相比全参微调减少了多少倍?
单选题 在Hugging Face transformers中,调用model.generate(do_sample=True, temperature=0.7, top_p=0.9, top_k=50),若某个token的logits为[2.0, 1.0, 0.5, 0.1],经过温度0.7缩放后,最高概率token的logits变为多少?
单选题 在vLLM推理框架中,PagedAttention主要解决了什么问题?
单选题 在Stable Diffusion的UNet中,cross-attention层的key/value来自哪里?
单选题 在LangChain中,使用RetrievalQA.from_chain_type时,如果不指定chain_type,默认使用哪种链?
单选题 使用FSDP(Fully Sharded Data Parallel)训练7B模型,若不开启CPU offload,每个GPU需要存储的参数比例大约是多少(假设8卡)?
单选题 RAG系统中,假设embedding向量维度=768,文档总数为1M,使用HNSW索引(ef_construction=200, M=16)。检索时,一次查询的时间复杂度约为: