Your vet will most likely choose to induce vomiting if the dog ate the marshmallows within the last couple of hours to prevent prolonged gastrointestinal upset, pancreatitis, and GI obstruction.
Feeding your dog treats that are high in sugar is never a good idea.
Ideally, marshmallows should be avoided.