Bring a large pot of salted water to a boil. Add yams and cook until tender, 8 to 10 minutes. Drain yams in a colander and transfer to a large shallow serving dish. Return pot to the stovetop.
Heat oil in the pot over medium-high heat. Add garlic, shallots, green onions, jalapeños, ginger, and salt and pepper. Cook, stirring often, until fragrant, 1 to 2 minutes. Reduce heat to medium-low and cook, covered, stirring occasionally, until ginger has softened, 15 to 20 minutes.
Stir basil into the ginger mixture and cook, uncovered, until basil has softened and released its fragrance (but not lost its bright color), about 30 seconds. Spoon ginger-basil mixture over yams. Season with salt and pepper. Right before serving, drizzle lime juice over the top.