According to "ESL Writing" by Mary Ellen Munoz Page, the following sentence:
"I baked an apple pie, but I forgot to put cinnamon in it."
is classified as a compound sentence,
whereas
"Sonia speaks English but does not write it."
is considered to be a simple sentence.
I don't see the difference between these sentences. I would omit the pronoun "I" after "but" in the first sentence, and classify it as a simple sentence, too.