How can I show the variant of a device in a symbol in EAGLE?
In the device screen you can add multiple packages. Each time you add one, a variant is created, which can be named.


I think names speak for themselves, but anyway let's look into them. For this just open 74-xx-little-us.lbr in the library editor and then device 74*1G00 as an example.


Package: you already know that it is footprint of the device on the board;
Variant: the identification of the package in relation to the current device;
technology: the intrinsic capability of the device.


Go to schematic editor, and import 74AHCT1G00DBVfrom the list of 74*1G00 from this 74-xx-little-us.lbr library.

This name 74AHCT1G00DBV is composed in the following way:


74*1G00;
AHCT put instead of * as technology;
DBV is added at the end as variant.


Now look into the library editor again. Right click onto package/variant line in the subwindow to the right, you will see that:


you can rename this selected variant (in other words, change package suffix);
you can add, remove or assign technologies for the device available in this selected package (variant).


In your example with microcontroller, which may have different RAM size:


create symbol for it, all packages/technologies/variants will have same symbol;
create packages this MCU is available in, add them to the list in library editor, for example N for DIP and D for SO;
add each package twice to the device, give each package in library editor's package/variant subwindow unique package identification, e.g. "KN" and "KD" for 16 KB RAM, and "YN" and "YD" for 32 KB RAM;
create technologies available, for example "42" for 3.3 V, and "46" for 5 V device;
name device as PIC*K22.


And in schematic editor you will have the following devices in the list available (of course depending on your technology assignments)

PIC42K22KN
PIC42K22KD
PIC42K22YN
PIC42K22YD
PIC46K22KN
PIC46K22KD
PIC46K22YN
PIC46K22YD


which will represent complete device identification marking.

The example above is (almost) out of the blue, because I like Microchip :)

(hopefully I did not make any logical mistake above, and I am sure you will figure out things yourself).