The reason that Octapus, Squid and Cuttlefish display intellegence is because of a fluke in evolution.
These animals use coloration as a form of defense. They can rapidly change color in order to disguise themselves or frighten predators away. Some of the color effects they can produce are quite dazzling.
They produce these colors much the way an LCD television does - colored skin cells on the cephalapod are controlled by muscles that either stretch or contract the surface of the cell so that the color inside the cell is either exposed or concealed. The muscles are controlled by nerve cells which are connected to the brain of the animal.
Because there is a huge array of color skin cells on a given Cephalapod, it requires a large brain in order to just control which cell is displaying what color, but becuase it is a defense mechanism, it is also necessary for the brain to be capable of making sensible choices deploying the color schemes.
All of these evolutionary processes result in a creature that has taken a seperate path to a level of intellegence. But apparently, size does make a difference.