Detta borde fungera för dig
@foreach($specifications->groupBy('name') as $name => $specificationGrouped)
<tr>
<td>{{ $name }}</td>
@foreach($specificationGrouped as $specification)
<td>{{ $specification['detail'] }} ({{ $specification['device_id'] }})</td>
@endforeach
</tr>
@endforeach