First, we prove the existence of certain types of non-special divisors of degree g − 1 in the algebraic function fields of genus g defined over F q . Then, it enables us to obtain upper bounds of the tensor rank of the multiplication in any extension of quadratic finite fields F q by using Shimura and modular curves defined over F q . From the preceding results, we obtain upper bounds of the tensor rank of the multiplication in any extension of certain non-quadratic finite fields F q , notably in the case of F 2 . These upper bounds attain the best asymptotic upper bounds of Shparlinski–Tsfasman–Vladut [I.E. Shparlinski, M.A. Tsfasman, S.G. Vladut, Curves with many points and multiplication in finite fields, in: Lecture Notes in Math., vol. 1518, Springer-Verlag, Berlin, 1992, pp. 145–169].