Motivating myself to continue being a very good student?
Here's just an outside impression. It doesn't look good to me that your motivation, your love for your subject, is affected by the fact that most students around you are weaker. Actually this is a situation in which &quot;the best&quot; regularly are, just by being the best. And if they are really the best, it will not drag them down. Why do you even care whether some others who are not as good as you also can graduate? You have stated that actually there are students and lecturers from whom you can learn, so stick to them.
I think you should not assign responsibility for your lack of motivation to fellow students or your institution. You have to ask yourself seriously whether what you do is right for you, and if it is, how you can change in order to keep your motivation up. (Of course it may be true that there are better universities and top groups, but if you are really cut out for doing something good in the field, you should be able and motivated to start doing that as long as you are still in the place you are.)