OBJECTIVES: I. Determine the safety of serial intradermal vaccinations of HER-2/neu derived peptides with sargramostim (GM-CSF) as an adjuvant in patients with stage III or IV HER-2/neu expressing breast, ovarian, or nonsmall cell lung cancer. II. Determine whether immunity can be elicited with peptides derived from the intracellular domain of the HER-2/neu protein. III. Determine whether immunity can be elicited with peptides derived from the extracellular domain of the HER-2/neu protein. IV. Determine whether cytotoxic T cells specific for the HER-2/neu protein can be elicited in patients with HLA-A2 by immunization with peptides derived from the HER-2/neu protein.