mirror of
				https://github.com/huggingface/transformers.git
				synced 2025-11-04 20:14:36 +08:00 
			
		
		
		
	Compare commits
	
		
			816 Commits
		
	
	
		
			reenable_t
			...
			v4.26.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ae54e3c3b1 | |||
| 865bb4e936 | |||
| 02c3f4145e | |||
| 1139260900 | |||
| 38620e1839 | |||
| 820c46a707 | |||
| a280cdd793 | |||
| baf0df1c6c | |||
| fd5cdaeea6 | |||
| 9e86c4e193 | |||
| d8415ba42e | |||
| c18b4fbe9f | |||
| b80b2218b5 | |||
| 275ad9d80a | |||
| 2218dac5d2 | |||
| e2bd7f80d0 | |||
| 354ea44340 | |||
| 1eda4a4102 | |||
| cf1a1eed70 | |||
| 5603f78fc4 | |||
| 929111698c | |||
| cb6b56859a | |||
| eaace0c668 | |||
| 6e4d3f0859 | |||
| 66459ce319 | |||
| 96b2b2de12 | |||
| 91ff7efeeb | |||
| c8d719ff7e | |||
| e1cd78634a | |||
| 4e730b3873 | |||
| 7fd902d335 | |||
| d54d7598bd | |||
| 7fc1cb150c | |||
| 142ad1a1cc | |||
| 425ff71c4e | |||
| b0969cafd0 | |||
| 2553363826 | |||
| 7419d807ff | |||
| ef53017520 | |||
| 6ee6993fd9 | |||
| 50540e18ff | |||
| 202d6863ce | |||
| af37d183b3 | |||
| 91c2278b97 | |||
| 5d3cb760a0 | |||
| 5326460f14 | |||
| 1b37fb5e17 | |||
| 862888a358 | |||
| 87208a05af | |||
| 758bd39e81 | |||
| 705e332b46 | |||
| cbaaa2f6ac | |||
| 0b86e330b1 | |||
| b9403e9516 | |||
| e9b4800dda | |||
| 9b42c68f7c | |||
| 4bc18e7a83 | |||
| fc8a93507c | |||
| 0359e2e15f | |||
| 5761ceb35a | |||
| 35920c9715 | |||
| 9b468a7cd7 | |||
| 464c86ac93 | |||
| 1d33f55cb8 | |||
| 5b949623c7 | |||
| 6d67664380 | |||
| 00ba7cadd8 | |||
| c59d71b282 | |||
| f70ee51029 | |||
| 0194665c33 | |||
| 05e72aa0c4 | |||
| 32525428e1 | |||
| 8ad06b7c13 | |||
| 8a17da2f7f | |||
| e1ad188641 | |||
| e15f0d73db | |||
| f4786d7f39 | |||
| defdcd2862 | |||
| 023f51fe16 | |||
| c8849583ad | |||
| 14154f7238 | |||
| 30c12301f8 | |||
| 44caf4f6f4 | |||
| 865da84abb | |||
| 0248810300 | |||
| d386fd646a | |||
| 868d37165f | |||
| 3a9bd972e2 | |||
| d96098c641 | |||
| f3feaf7f22 | |||
| cf028d0c3d | |||
| bb300ac686 | |||
| 25ddd91b24 | |||
| 8896ebb9a9 | |||
| f30bcd5357 | |||
| 3bbc2451b1 | |||
| 0dde58978a | |||
| 7b5e943cb6 | |||
| 7f3dab39b5 | |||
| e5dcceb82c | |||
| 2411f0e465 | |||
| 9edf375834 | |||
| 0fb27dc988 | |||
| 4bbbabcb2c | |||
| a45914193a | |||
| a5327c6a9a | |||
| 488a179ce1 | |||
| fa906a264b | |||
| 125f137562 | |||
| 05b8e25fff | |||
| 4ed89d48ab | |||
| 5db9abde43 | |||
| 15adc24208 | |||
| 056218dab1 | |||
| c8f35a9ce3 | |||
| 7f65d2366a | |||
| f58248b824 | |||
| 95f0dd2123 | |||
| b210c83a78 | |||
| b3a0aad37d | |||
| 41b0564b35 | |||
| 212829ade6 | |||
| b5be744d3c | |||
| e849e5bb4a | |||
| 6767ce71d6 | |||
| 64b6b2b273 | |||
| 8f796960f6 | |||
| 07cde58bdb | |||
| a3c37825cc | |||
| e3ecbaa4ab | |||
| 48d4e147d8 | |||
| d0f324f1e1 | |||
| 9a046cc14e | |||
| f0577df6de | |||
| 7cb596fa22 | |||
| bd9d51263a | |||
| f93c90d217 | |||
| c29bec485e | |||
| 61e068e5a2 | |||
| ff8dcb5efa | |||
| 35a7052b61 | |||
| 1d21471c78 | |||
| bc53fc6265 | |||
| 4f1c9d162e | |||
| 12313838d3 | |||
| bf82c9b74f | |||
| beb24f2a36 | |||
| 480799f718 | |||
| 8fb4d0e4b4 | |||
| b7417bee87 | |||
| 05b736c16e | |||
| 94db82573e | |||
| b91048968b | |||
| 263fd3c4c7 | |||
| d53f329d88 | |||
| 7804177af9 | |||
| 15e17c99f9 | |||
| 9dcc881fa6 | |||
| a6c850e4f4 | |||
| 3b309818e7 | |||
| 926452298d | |||
| 56397471b4 | |||
| 52c9e6af29 | |||
| 292acd71d6 | |||
| f9e977be70 | |||
| b493fee958 | |||
| d7b66d9b44 | |||
| ce85686a1f | |||
| 45da7cec5a | |||
| cd918492c6 | |||
| cd2457809f | |||
| e901914da7 | |||
| 8f09dd89f6 | |||
| 7b0727a401 | |||
| 15c68c67f4 | |||
| a9653400d3 | |||
| 9c9fe89f84 | |||
| e697c912c2 | |||
| 9c6f7485a6 | |||
| 305f41e4de | |||
| 367fdf3330 | |||
| 4fd89e4978 | |||
| a3e8d3cb1c | |||
| 588faad106 | |||
| 375801d5e6 | |||
| 092d4d49dd | |||
| 47c9b22d08 | |||
| 9e6da0a7ed | |||
| 17292440c0 | |||
| 881fa716c8 | |||
| 491a33d138 | |||
| 8637316e5e | |||
| fe65657de1 | |||
| 11c49ed23b | |||
| 0b686a8a1e | |||
| bbcd961897 | |||
| 5f9b2ce0ea | |||
| 5fa0b17c3d | |||
| e35bc46af6 | |||
| d1b3011292 | |||
| accad48e5b | |||
| 47146721b8 | |||
| 3830b3f74a | |||
| a081f292ca | |||
| cab7799f7b | |||
| efed8a2794 | |||
| f7f0ec2f54 | |||
| 15bc776fec | |||
| 4a4cd6cd02 | |||
| 52dd2b61bf | |||
| 4d10ffd506 | |||
| 2222740f50 | |||
| 829e889418 | |||
| 39e620c134 | |||
| 4a433e321f | |||
| 76d02feadb | |||
| aaa6296de2 | |||
| 3090e70857 | |||
| 04c560225b | |||
| 0ae58204c6 | |||
| 2da82bb4a7 | |||
| 852e7ebaa2 | |||
| d87e381f93 | |||
| 9efad4efed | |||
| 0d284bd574 | |||
| 3be028bc9d | |||
| bd1a43b699 | |||
| 5eecf3ff17 | |||
| 2875fa971c | |||
| 2280880cb7 | |||
| d0bfdd20f4 | |||
| d1d3ac9403 | |||
| 244dd0f150 | |||
| ae3cbbcaf6 | |||
| 7ef3f19c3c | |||
| bdb84e2bad | |||
| f76518e56a | |||
| 76924384af | |||
| ecd7de3dff | |||
| 6b5a8f83ce | |||
| b4b613b102 | |||
| 7032e02032 | |||
| 26dd041c6e | |||
| 7f99861218 | |||
| e65445b4d6 | |||
| 3ee958207a | |||
| 4341f4e224 | |||
| 1543cee7c8 | |||
| 491e951875 | |||
| 4bc723f87d | |||
| b1706f6908 | |||
| fca66abe2a | |||
| 8891193e83 | |||
| b9b70b0e66 | |||
| fe9152f67c | |||
| a9912d2fca | |||
| 67acb07e9e | |||
| 94f8e21c70 | |||
| 7b23a582b9 | |||
| 7c9e2f248c | |||
| dfd818420d | |||
| 11745b4e45 | |||
| 722bf7efcc | |||
| 9bafedc0fa | |||
| d994473b05 | |||
| ba9da49aa2 | |||
| f28c918c7e | |||
| 6ef42587ae | |||
| 30d8919ab1 | |||
| 4f1788b34d | |||
| a12c5cbcd8 | |||
| 1af4bee896 | |||
| d4bf9ee1ff | |||
| f41a11a16f | |||
| 1416b5d9d8 | |||
| a450789d9a | |||
| 29ff8716a2 | |||
| 5f94855dc3 | |||
| b58beebe72 | |||
| fd2bed7f9f | |||
| c1b9a11dd4 | |||
| 0ba94aceb6 | |||
| a413c725d4 | |||
| 17c742bbf5 | |||
| 8f1f59ce86 | |||
| 53357e8196 | |||
| 5ba2dbd9b1 | |||
| a3345c1f13 | |||
| 8286af6f54 | |||
| 8d2fca07e8 | |||
| 799cea64ac | |||
| 74330083b5 | |||
| 7319850902 | |||
| a95fd35426 | |||
| 704027f0ef | |||
| 6a062a3ed9 | |||
| 9a6c6ef97f | |||
| 9e56aff58a | |||
| c56ebbbea6 | |||
| 183af58b11 | |||
| cf1b8c34cc | |||
| e3cc4487fe | |||
| bcc069ddb8 | |||
| 9858ecd706 | |||
| 69038ce009 | |||
| 9cc65f8701 | |||
| da95f6ca4c | |||
| efd7c021ee | |||
| 9e33e19bf5 | |||
| 6eae3f7801 | |||
| be3d6c84cc | |||
| c83703cbdb | |||
| a03f7514db | |||
| 521da6518f | |||
| 93b54368f5 | |||
| 0526a075c5 | |||
| fc95386ea1 | |||
| 77382e918d | |||
| 7c5eaf9e5a | |||
| 3ac040bca1 | |||
| 3994c04585 | |||
| 147fa37fb1 | |||
| cec5f7abd1 | |||
| 3e4c9e5c64 | |||
| aac7b0d232 | |||
| d151a8c550 | |||
| b610c47f89 | |||
| 6c1a0b3931 | |||
| c95f84700c | |||
| f68796bd60 | |||
| f821bea0ad | |||
| 4f78bcb287 | |||
| 7586a1a367 | |||
| bf9a5882a7 | |||
| acc439ba17 | |||
| 9b14c1b6bf | |||
| 6a707cf586 | |||
| 97a51b0c7d | |||
| b9a0ede6ab | |||
| ae06bce888 | |||
| 25e10da427 | |||
| e842e181df | |||
| 28f3d431d4 | |||
| 5764efe544 | |||
| 720e9599c1 | |||
| 7d1c1c5b21 | |||
| 73ec12eafb | |||
| aef9aac312 | |||
| 74fb524e20 | |||
| ef0f85cd57 | |||
| 67d32f4649 | |||
| 9763f829a5 | |||
| 4430b91298 | |||
| eefae413d1 | |||
| d5af5a0c87 | |||
| ac3bccdc74 | |||
| 87282cb73c | |||
| afe2a466bb | |||
| 8ea6694d92 | |||
| 84c9bf7421 | |||
| 538e5248b0 | |||
| 13e736685a | |||
| 91182e3a70 | |||
| cc8aec6740 | |||
| e7e6d1818a | |||
| 9ffbed26c0 | |||
| e17826539b | |||
| 8639cfb4c2 | |||
| 6276b437a6 | |||
| 0911057744 | |||
| e135a6c931 | |||
| 24124709ca | |||
| 699e90437f | |||
| c54646b13d | |||
| cc3d0e1b01 | |||
| 3a9476d1b4 | |||
| 60d1f31bb0 | |||
| 5011efbec8 | |||
| 504ae9181c | |||
| 6cb7d6ec36 | |||
| d752337baa | |||
| b67ac44296 | |||
| d51e7c7e82 | |||
| 8b486c0310 | |||
| cdb7eeca46 | |||
| 876a9e084e | |||
| 373bfe70a0 | |||
| 55ab71ee5b | |||
| e342ac7e03 | |||
| 68cfffc4b4 | |||
| dd6fb1319b | |||
| afb66749a6 | |||
| 04c653a354 | |||
| 721764028e | |||
| 396a6a2ed0 | |||
| 08b4621899 | |||
| 829374e4fc | |||
| 17a7b49bda | |||
| afad0c18d9 | |||
| 761b3fad92 | |||
| a4beb37b81 | |||
| 105c3a48be | |||
| b75255cd9d | |||
| 293991d44b | |||
| d0c1ded5f3 | |||
| de6d19ea92 | |||
| ae3cbc9548 | |||
| 08fad080e3 | |||
| ab9fe45236 | |||
| 4aa630eeab | |||
| 86e435bbb1 | |||
| 73e2faa6c2 | |||
| fb2b45e562 | |||
| e8d448edcf | |||
| bbcd5eea3b | |||
| 3b91f96fc9 | |||
| ae1cffaf3c | |||
| 28247e7881 | |||
| 6dc884abc8 | |||
| 955780d3ab | |||
| d59d5a618b | |||
| 321ef388fe | |||
| 0bae286de9 | |||
| 39a72125e7 | |||
| 30163921ae | |||
| ac2f6674a3 | |||
| 667ccea722 | |||
| 0a6193252e | |||
| 98122794d4 | |||
| 134a8e21ae | |||
| de53e4bf1f | |||
| ca3b652bbd | |||
| 8f7078e822 | |||
| de4159a318 | |||
| 72b19ca680 | |||
| f244a97801 | |||
| df938fc1b4 | |||
| 2cdac665b0 | |||
| 61d3928bfb | |||
| 3c39c07f11 | |||
| a547d5bda5 | |||
| a1d4563f7a | |||
| afce73bd9d | |||
| 993a187c6f | |||
| bc00c29d11 | |||
| 9a5b84a007 | |||
| ad654e4484 | |||
| 03ae1f060b | |||
| 81d82e4f78 | |||
| 658e5d8f58 | |||
| 81c46679bd | |||
| 1c6309bf79 | |||
| 0ee71188ff | |||
| e53331c905 | |||
| 2e17db8a86 | |||
| d2357a0133 | |||
| 3d0c0ae437 | |||
| 9ef46659da | |||
| 5efd074af0 | |||
| dfc3deafa3 | |||
| 72eaaf6d55 | |||
| f3a1efd1cf | |||
| 624ae09f5c | |||
| ac3952b443 | |||
| c0fe912840 | |||
| f2e7d270ec | |||
| c3eb01013b | |||
| d896029e27 | |||
| 4973d2a04c | |||
| 1e3f17b5ab | |||
| 96783e53b4 | |||
| 149483b252 | |||
| 4cf38148dc | |||
| d21c97cc0f | |||
| 22d7161a52 | |||
| 74297d0a55 | |||
| 11f3ec7224 | |||
| d28448c5cd | |||
| 05d80d856c | |||
| 3de07473da | |||
| 8503cc7550 | |||
| d316037ad7 | |||
| fc4a993e1b | |||
| 8d6de0b9cf | |||
| b2c863a319 | |||
| f10cdba22e | |||
| 9d1ef009b8 | |||
| 8e777b3ba4 | |||
| 84c9cc6d15 | |||
| 37e016331f | |||
| a3f7458066 | |||
| f7ab8c4251 | |||
| b98269425e | |||
| c29a2f7c9c | |||
| 95754b47a6 | |||
| 532e60bedf | |||
| df56c843be | |||
| 4bb0764750 | |||
| 700e0cd65f | |||
| 6b217c52e6 | |||
| 904ac21020 | |||
| 8b8b23a8cd | |||
| 07b8f249cd | |||
| 0f78529f98 | |||
| 2062c28552 | |||
| 3a780cc57a | |||
| 3fad6ae3fd | |||
| 6c2be845dd | |||
| 7d65efec29 | |||
| 0a144b8c6b | |||
| 441811ecd7 | |||
| 5e012f8e3c | |||
| 610acc5ae9 | |||
| d4d23141c4 | |||
| 9ea1dbd2be | |||
| 21b0ad05a0 | |||
| 389702242d | |||
| 9accbe531e | |||
| d9efb36cf6 | |||
| c282e93a74 | |||
| e06657a798 | |||
| 69715f2ee0 | |||
| 291c17f608 | |||
| a239bdd28f | |||
| e9d9982e7c | |||
| 5ca479d252 | |||
| 449f2ae459 | |||
| f6490180eb | |||
| c389d35a7f | |||
| 9681f052a1 | |||
| e627e9b5ae | |||
| 4fb34de99e | |||
| 1f029b6ae7 | |||
| 443aaaa1a7 | |||
| e434627858 | |||
| 529037fda5 | |||
| 5e080c11bf | |||
| 860ea8a574 | |||
| a00b7e85ea | |||
| 0d0d77693f | |||
| 822ae69c1b | |||
| c19aa7acce | |||
| 5b62f8ea2b | |||
| 26ec7928d0 | |||
| 7f74433814 | |||
| 9643ecf8ca | |||
| 777b1bfe62 | |||
| b4997382da | |||
| 6e3b014471 | |||
| cf7b98b807 | |||
| 683cbc4c34 | |||
| 6ed6ed29b1 | |||
| d3d5fa3e85 | |||
| 92cfe8b074 | |||
| 2d92001076 | |||
| 4c7e8d0900 | |||
| 163ac3d3ee | |||
| 55ba31908a | |||
| f1e8c48c5e | |||
| 11b2e45ccc | |||
| f60eec4003 | |||
| f9909fbf85 | |||
| 9625924c60 | |||
| 8fadfd5035 | |||
| 25c451e5a0 | |||
| 938cb04789 | |||
| fda125638f | |||
| 36b063ed4f | |||
| 536e60d2c7 | |||
| af1a7c8ca3 | |||
| 7ecb039176 | |||
| 07d8d6e2f7 | |||
| c149d366bb | |||
| 8dcf494ef1 | |||
| 7b55bb4540 | |||
| d24e84d9ed | |||
| 03bc6ece1b | |||
| 2308f3d42c | |||
| 78a471ff71 | |||
| f711d683b5 | |||
| 6cc06d1739 | |||
| cbbeca3d17 | |||
| d3c0566679 | |||
| 61a51f5f23 | |||
| 9740a03f61 | |||
| 905e5773a3 | |||
| 68187c4642 | |||
| 6dda14dc47 | |||
| e0d7c831c7 | |||
| daf4436e07 | |||
| 9f0c72f93b | |||
| d066c3731b | |||
| 7ec1dc8817 | |||
| 67b3789133 | |||
| 93e14486d6 | |||
| f3d99e49d4 | |||
| a44985b41c | |||
| f270b960d6 | |||
| bac2d29a80 | |||
| d606d566ab | |||
| c4cad8e301 | |||
| 0946ed94fd | |||
| 316bf04d3d | |||
| 4eb918e656 | |||
| c08a1e26ab | |||
| e2a23b6ce9 | |||
| 2d6a92f22a | |||
| efa889d2e4 | |||
| 258963062b | |||
| 3e39fd09a9 | |||
| fb1c8db78a | |||
| 6156bffa2b | |||
| 71f772ebd0 | |||
| d44ac47bac | |||
| 2bdd9fa284 | |||
| cfaeb1539e | |||
| 3222fc645b | |||
| b8112eddec | |||
| 4ab6e9e2f8 | |||
| b77406bcb2 | |||
| 9617b1304e | |||
| a0f8674303 | |||
| 504db92e7d | |||
| 4b86e44693 | |||
| d68c46026b | |||
| c06d555647 | |||
| 2d02178e5c | |||
| 3bd0007e87 | |||
| 6e1c5786dc | |||
| 707b12a353 | |||
| 787620e2a2 | |||
| 3936411b9d | |||
| 94e17c456c | |||
| 19067711e7 | |||
| 3502c202f9 | |||
| 1076d587b5 | |||
| d447c460b1 | |||
| 06886d5a68 | |||
| 9080607b2c | |||
| 6f257bb3c2 | |||
| 2564f0c21d | |||
| 737bff6a36 | |||
| 06d488061f | |||
| 790ff2544a | |||
| 9ccea7acb1 | |||
| a639ea9e8a | |||
| ec6878f6ca | |||
| aa39967b28 | |||
| 305e8718b4 | |||
| 9f9ddcc2de | |||
| fb7cbe236b | |||
| f69eb24b5a | |||
| 7487743793 | |||
| 9aedce99b0 | |||
| 49b77b89ea | |||
| c6c9db3d0c | |||
| a6b7759880 | |||
| 2e3452af0f | |||
| 8827e1b217 | |||
| cb630ffab8 | |||
| 79c720c062 | |||
| 831590f6a9 | |||
| ab74ac11e4 | |||
| dec8578e70 | |||
| 1f6885bad0 | |||
| 4f1e5e4efd | |||
| 38e5b71abb | |||
| 4f90fc1db8 | |||
| c87ae86a8f | |||
| c796b6dea6 | |||
| c3a93d8d82 | |||
| 7f9b7b3f0e | |||
| 4c9e0f029e | |||
| 8214a9f66a | |||
| 6aede2d602 | |||
| f38a145418 | |||
| 9406c7bc82 | |||
| 225c36fbe5 | |||
| 6176e13612 | |||
| b047472650 | |||
| a83bb45fb8 | |||
| 243439a827 | |||
| 0b294c2334 | |||
| 2e35bac4e7 | |||
| 9d2788b46b | |||
| b0a2c3a2d6 | |||
| 98c9c5add9 | |||
| 0d4c45c585 | |||
| 9b1dcba94a | |||
| 347ba38cb4 | |||
| dcca71be61 | |||
| 4cef546ffc | |||
| ebfd7229d2 | |||
| 6c24443ff5 | |||
| e4132952a1 | |||
| d818dd3a41 | |||
| 50f5266b2c | |||
| 536a8ae6ad | |||
| d56d723fad | |||
| c766a2d70a | |||
| 1e6141c3d4 | |||
| ecf29db0e5 | |||
| ea118ae2e1 | |||
| f1e42bc50e | |||
| bec78ba154 | |||
| 568e578310 | |||
| 803475fb69 | |||
| 7629656926 | |||
| 6d023270f6 | |||
| 7a1c68a845 | |||
| 688c3e8e40 | |||
| 7829c890db | |||
| aeae97829f | |||
| fdffee8a60 | |||
| 802b98c72b | |||
| 5d2d51a0fb | |||
| 1f1cc09df6 | |||
| 5fd5990dce | |||
| 2447672269 | |||
| f9257843b5 | |||
| eedaba682f | |||
| d39f794eda | |||
| 0a77249178 | |||
| ab108a0e31 | |||
| 0bd6d9340e | |||
| 371337a95b | |||
| d4eb52d13d | |||
| 9ecb13d63a | |||
| 072ed01c38 | |||
| 1f7e40d04f | |||
| 8b2501b4b9 | |||
| 5cbf1fa8ca | |||
| 8db92dbe26 | |||
| 743995e0e6 | |||
| d3f4cef74d | |||
| 3b419cfc6f | |||
| 7ccd6fc47c | |||
| 18adc40d87 | |||
| 0b59ecdefd | |||
| 536f338441 | |||
| f58b211ed3 | |||
| c949188b9d | |||
| 82df83a96b | |||
| 22502ebb85 | |||
| 6f8064da6b | |||
| 674f750a57 | |||
| 74b3eb3dea | |||
| 3436842102 | |||
| e0b825a8d0 | |||
| c4a997cd85 | |||
| 2e5c6f5975 | |||
| cca51aa151 | |||
| b58d4f70f6 | |||
| 3a1aeea3c5 | |||
| 31565ff0fd | |||
| 2ebf4e6a7b | |||
| c1f009ad9a | |||
| 9151e649a5 | |||
| 3aaabaa214 | |||
| 7487829a23 | |||
| a5da6f1817 | |||
| 84f6bee5da | |||
| 12ce2941c7 | |||
| 15fd39ea0e | |||
| 5ed9bd1896 | |||
| c186e816bd | |||
| baa00f65ae | |||
| 2dd1b8f0c5 | |||
| 17d7aec895 | |||
| a40386669f | |||
| eb98da9880 | |||
| 506355ca75 | |||
| 123f65eea6 | |||
| cc03063366 | |||
| bbe2c8b126 | |||
| 5602a3ae1e | |||
| 0a03741590 | |||
| 65d36ee861 | |||
| 5041bc3511 | |||
| 44a40c1466 | |||
| bed2edb99f | |||
| c206fc8779 | |||
| b17a5e0074 | |||
| d2ed8134f1 | |||
| 7df0751cc6 | |||
| 71786b10c5 | |||
| fc5fdc109d | |||
| c9a0da1e12 | |||
| eccbdbcd4d | |||
| 32670805fc | |||
| ebee0a2794 | |||
| fa8ed9ca76 | |||
| 31ec424b3d | |||
| a929f81e92 | |||
| a23819ed6a | |||
| af556a09f6 | |||
| fb0bd7b7a8 | |||
| 14fe3e0410 | |||
| 06a82a49ae | |||
| f3ed26a3fb | |||
| 5864051109 | |||
| 63d13d768b | |||
| ee2a80ecc0 | |||
| 02b63702d9 | |||
| fac1f4b188 | |||
| dd523da577 | |||
| 713eab45d3 | |||
| fd99ce3329 | |||
| 8fcbbd3d53 | |||
| af150e4a1c | |||
| bf0e094142 | |||
| 71ca79448c | |||
| fd5eac5f71 | |||
| 90071fe42b | |||
| 072dfdaee4 | |||
| fd9a027aca | 
@ -9,6 +9,19 @@ parameters:
 | 
			
		||||
        default: false
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
    # Ensure running with CircleCI/huggingface
 | 
			
		||||
    check_circleci_user:
 | 
			
		||||
        docker:
 | 
			
		||||
            - image: cimg/python:3.7.12
 | 
			
		||||
        parallelism: 1
 | 
			
		||||
        steps:
 | 
			
		||||
            - run: echo $CIRCLE_PROJECT_USERNAME
 | 
			
		||||
            - run: |
 | 
			
		||||
                if [ "$CIRCLE_PROJECT_USERNAME" = "huggingface" ]; then
 | 
			
		||||
                    exit 0
 | 
			
		||||
                else
 | 
			
		||||
                    echo "The CI is running under $CIRCLE_PROJECT_USERNAME personal account. Please follow https://support.circleci.com/hc/en-us/articles/360008097173-Troubleshooting-why-pull-requests-are-not-triggering-jobs-on-my-organization- to fix it."; exit -1
 | 
			
		||||
                fi
 | 
			
		||||
    # Fetch the tests to run
 | 
			
		||||
    fetch_tests:
 | 
			
		||||
        working_directory: ~/transformers
 | 
			
		||||
@ -30,7 +43,13 @@ jobs:
 | 
			
		||||
                else
 | 
			
		||||
                    touch test_preparation/test_list.txt
 | 
			
		||||
                fi
 | 
			
		||||
            - run: python utils/tests_fetcher.py --filter_pipeline_tests
 | 
			
		||||
            - run: |
 | 
			
		||||
                if [ -f test_repo_utils.txt ]; then
 | 
			
		||||
                    mv test_repo_utils.txt test_preparation/test_repo_utils.txt
 | 
			
		||||
                else
 | 
			
		||||
                    touch test_preparation/test_repo_utils.txt
 | 
			
		||||
                fi
 | 
			
		||||
            - run: python utils/tests_fetcher.py --filter_tests
 | 
			
		||||
            - run: |
 | 
			
		||||
                if [ -f test_list.txt ]; then
 | 
			
		||||
                    mv test_list.txt test_preparation/filtered_test_list.txt
 | 
			
		||||
@ -69,14 +88,19 @@ jobs:
 | 
			
		||||
            - image: cimg/python:3.7.12
 | 
			
		||||
        parallelism: 1
 | 
			
		||||
        steps:
 | 
			
		||||
            - checkout
 | 
			
		||||
            - run: pip install --upgrade pip
 | 
			
		||||
            - run: pip install GitPython
 | 
			
		||||
            - run: pip install .
 | 
			
		||||
            - run: |
 | 
			
		||||
                  mkdir test_preparation
 | 
			
		||||
                  echo "tests" > test_preparation/test_list.txt
 | 
			
		||||
                  echo "tests" > test_preparation/examples_test_list.txt
 | 
			
		||||
            - run: python utils/tests_fetcher.py --filter_pipeline_tests
 | 
			
		||||
            - run: mv test_list.txt test_preparation/filtered_test_list.txt
 | 
			
		||||
                  echo -n "tests" > test_preparation/test_list.txt
 | 
			
		||||
                  echo -n "tests" > test_preparation/examples_test_list.txt
 | 
			
		||||
                  echo -n "tests/repo_utils" > test_preparation/test_repo_utils.txt
 | 
			
		||||
            - run: |
 | 
			
		||||
                  echo -n "tests" > test_list.txt
 | 
			
		||||
                  python utils/tests_fetcher.py --filter_tests
 | 
			
		||||
                  mv test_list.txt test_preparation/filtered_test_list.txt
 | 
			
		||||
            - run: python .circleci/create_circleci_config.py --fetcher_folder test_preparation
 | 
			
		||||
            - run: cp test_preparation/generated_config.yml test_preparation/generated_config.txt
 | 
			
		||||
            - store_artifacts:
 | 
			
		||||
@ -105,6 +129,11 @@ jobs:
 | 
			
		||||
                  key: v0.5-code_quality-{{ checksum "setup.py" }}
 | 
			
		||||
                  paths:
 | 
			
		||||
                      - '~/.cache/pip'
 | 
			
		||||
            - run:
 | 
			
		||||
                name: Show installed libraries and their versions
 | 
			
		||||
                command: pip freeze | tee installed.txt
 | 
			
		||||
            - store_artifacts:
 | 
			
		||||
                  path: ~/transformers/installed.txt
 | 
			
		||||
            - run: black --check --preview examples tests src utils
 | 
			
		||||
            - run: isort --check-only examples tests src utils
 | 
			
		||||
            - run: python utils/custom_init_isort.py --check_only
 | 
			
		||||
@ -134,6 +163,11 @@ jobs:
 | 
			
		||||
                  key: v0.5-repository_consistency-{{ checksum "setup.py" }}
 | 
			
		||||
                  paths:
 | 
			
		||||
                      - '~/.cache/pip'
 | 
			
		||||
            - run:
 | 
			
		||||
                name: Show installed libraries and their versions
 | 
			
		||||
                command: pip freeze | tee installed.txt
 | 
			
		||||
            - store_artifacts:
 | 
			
		||||
                  path: ~/transformers/installed.txt
 | 
			
		||||
            - run: python utils/check_copies.py
 | 
			
		||||
            - run: python utils/check_table.py
 | 
			
		||||
            - run: python utils/check_dummies.py
 | 
			
		||||
@ -150,6 +184,7 @@ workflows:
 | 
			
		||||
        when:
 | 
			
		||||
            not: <<pipeline.parameters.nightly>>
 | 
			
		||||
        jobs:
 | 
			
		||||
            - check_circleci_user
 | 
			
		||||
            - check_code_quality
 | 
			
		||||
            - check_repository_consistency
 | 
			
		||||
            - fetch_tests
 | 
			
		||||
@ -157,6 +192,7 @@ workflows:
 | 
			
		||||
    nightly:
 | 
			
		||||
        when: <<pipeline.parameters.nightly>>
 | 
			
		||||
        jobs:
 | 
			
		||||
            - check_circleci_user
 | 
			
		||||
            - check_code_quality
 | 
			
		||||
            - check_repository_consistency
 | 
			
		||||
            - fetch_all_tests
 | 
			
		||||
@ -15,7 +15,9 @@
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
import copy
 | 
			
		||||
import glob
 | 
			
		||||
import os
 | 
			
		||||
import random
 | 
			
		||||
from dataclasses import dataclass
 | 
			
		||||
from typing import Any, Dict, List, Optional
 | 
			
		||||
 | 
			
		||||
@ -25,7 +27,6 @@ import yaml
 | 
			
		||||
COMMON_ENV_VARIABLES = {"OMP_NUM_THREADS": 1, "TRANSFORMERS_IS_CI": True, "PYTEST_TIMEOUT": 120}
 | 
			
		||||
COMMON_PYTEST_OPTIONS = {"max-worker-restart": 0, "dist": "loadfile", "s": None}
 | 
			
		||||
DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.7.12"}]
 | 
			
		||||
TORCH_SCATTER_INSTALL = "pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.12.0+cpu.html"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@dataclass
 | 
			
		||||
@ -59,6 +60,8 @@ class CircleCIJob:
 | 
			
		||||
            self.pytest_options = {}
 | 
			
		||||
        if isinstance(self.tests_to_run, str):
 | 
			
		||||
            self.tests_to_run = [self.tests_to_run]
 | 
			
		||||
        if self.parallelism is None:
 | 
			
		||||
            self.parallelism = 1
 | 
			
		||||
 | 
			
		||||
    def to_dict(self):
 | 
			
		||||
        job = {
 | 
			
		||||
@ -91,6 +94,8 @@ class CircleCIJob:
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        )
 | 
			
		||||
        steps.append({"run": {"name": "Show installed libraries and their versions", "command": "pip freeze | tee installed.txt"}})
 | 
			
		||||
        steps.append({"store_artifacts": {"path": "~/transformers/installed.txt"}})
 | 
			
		||||
 | 
			
		||||
        all_options = {**COMMON_PYTEST_OPTIONS, **self.pytest_options}
 | 
			
		||||
        pytest_flags = [f"--{key}={value}" if value is not None else f"-{key}" for key, value in all_options.items()]
 | 
			
		||||
@ -98,10 +103,57 @@ class CircleCIJob:
 | 
			
		||||
            f"--make-reports={self.name}" if "examples" in self.name else f"--make-reports=tests_{self.name}"
 | 
			
		||||
        )
 | 
			
		||||
        test_command = f"python -m pytest -n {self.pytest_num_workers} " + " ".join(pytest_flags)
 | 
			
		||||
        if self.tests_to_run is None:
 | 
			
		||||
            test_command += " << pipeline.parameters.tests_to_run >>"
 | 
			
		||||
        if self.parallelism == 1:
 | 
			
		||||
            if self.tests_to_run is None:
 | 
			
		||||
                test_command += " << pipeline.parameters.tests_to_run >>"
 | 
			
		||||
            else:
 | 
			
		||||
                test_command += " " + " ".join(self.tests_to_run)
 | 
			
		||||
        else:
 | 
			
		||||
            test_command += " " + " ".join(self.tests_to_run)
 | 
			
		||||
            # We need explicit list instead of `pipeline.parameters.tests_to_run` (only available at job runtime)
 | 
			
		||||
            tests = self.tests_to_run
 | 
			
		||||
            if tests is None:
 | 
			
		||||
                folder = os.environ["test_preparation_dir"]
 | 
			
		||||
                test_file = os.path.join(folder, "filtered_test_list.txt")
 | 
			
		||||
                if os.path.exists(test_file):
 | 
			
		||||
                    with open(test_file) as f:
 | 
			
		||||
                        tests = f.read().split(" ")
 | 
			
		||||
 | 
			
		||||
            # expand the test list
 | 
			
		||||
            if tests == ["tests"]:
 | 
			
		||||
                tests = [os.path.join("tests", x) for x in os.listdir("tests")]
 | 
			
		||||
            expanded_tests = []
 | 
			
		||||
            for test in tests:
 | 
			
		||||
                if test.endswith(".py"):
 | 
			
		||||
                    expanded_tests.append(test)
 | 
			
		||||
                elif test == "tests/models":
 | 
			
		||||
                    expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
 | 
			
		||||
                elif test == "tests/pipelines":
 | 
			
		||||
                    expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
 | 
			
		||||
                else:
 | 
			
		||||
                    expanded_tests.append(test)
 | 
			
		||||
            # Avoid long tests always being collected together
 | 
			
		||||
            random.shuffle(expanded_tests)
 | 
			
		||||
            tests = " ".join(expanded_tests)
 | 
			
		||||
 | 
			
		||||
            # Each executor to run ~10 tests
 | 
			
		||||
            n_executors = max(len(tests) // 10, 1)
 | 
			
		||||
            # Avoid empty test list on some executor(s) or launching too many executors
 | 
			
		||||
            if n_executors > self.parallelism:
 | 
			
		||||
                n_executors = self.parallelism
 | 
			
		||||
            job["parallelism"] = n_executors
 | 
			
		||||
 | 
			
		||||
            # Need to be newline separated for the command `circleci tests split` below
 | 
			
		||||
            command = f'echo {tests} | tr " " "\\n" >> tests.txt'
 | 
			
		||||
            steps.append({"run": {"name": "Get tests", "command": command}})
 | 
			
		||||
 | 
			
		||||
            command = 'TESTS=$(circleci tests split tests.txt) && echo $TESTS > splitted_tests.txt'
 | 
			
		||||
            steps.append({"run": {"name": "Split tests", "command": command}})
 | 
			
		||||
 | 
			
		||||
            steps.append({"store_artifacts": {"path": "~/transformers/tests.txt"}})
 | 
			
		||||
            steps.append({"store_artifacts": {"path": "~/transformers/splitted_tests.txt"}})
 | 
			
		||||
 | 
			
		||||
            test_command = f"python -m pytest -n {self.pytest_num_workers} " + " ".join(pytest_flags)
 | 
			
		||||
            test_command += " $(cat splitted_tests.txt)"
 | 
			
		||||
        if self.marker is not None:
 | 
			
		||||
            test_command += f" -m {self.marker}"
 | 
			
		||||
        test_command += " | tee tests_output.txt"
 | 
			
		||||
@ -125,9 +177,7 @@ torch_and_tf_job = CircleCIJob(
 | 
			
		||||
        "git lfs install",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,tf-cpu,torch,testing,sentencepiece,torch-speech,vision]",
 | 
			
		||||
        TORCH_SCATTER_INSTALL,
 | 
			
		||||
        "pip install tensorflow_probability",
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
        "pip install git+https://github.com/huggingface/accelerate",
 | 
			
		||||
    ],
 | 
			
		||||
    marker="is_pt_tf_cross_test",
 | 
			
		||||
@ -142,8 +192,6 @@ torch_and_flax_job = CircleCIJob(
 | 
			
		||||
        "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,flax,torch,testing,sentencepiece,torch-speech,vision]",
 | 
			
		||||
        TORCH_SCATTER_INSTALL,
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
        "pip install git+https://github.com/huggingface/accelerate",
 | 
			
		||||
    ],
 | 
			
		||||
    marker="is_pt_flax_cross_test",
 | 
			
		||||
@ -157,10 +205,9 @@ torch_job = CircleCIJob(
 | 
			
		||||
        "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng time",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]",
 | 
			
		||||
        TORCH_SCATTER_INSTALL,
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
        "pip install git+https://github.com/huggingface/accelerate",
 | 
			
		||||
    ],
 | 
			
		||||
    parallelism=1,
 | 
			
		||||
    pytest_num_workers=3,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -172,8 +219,8 @@ tf_job = CircleCIJob(
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]",
 | 
			
		||||
        "pip install tensorflow_probability",
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
    ],
 | 
			
		||||
    parallelism=1,
 | 
			
		||||
    pytest_options={"rA": None},
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -184,8 +231,8 @@ flax_job = CircleCIJob(
 | 
			
		||||
        "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[flax,testing,sentencepiece,flax-speech,vision]",
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
    ],
 | 
			
		||||
    parallelism=1,
 | 
			
		||||
    pytest_options={"rA": None},
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -195,9 +242,7 @@ pipelines_torch_job = CircleCIJob(
 | 
			
		||||
    install_steps=[
 | 
			
		||||
        "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]",
 | 
			
		||||
        TORCH_SCATTER_INSTALL,
 | 
			
		||||
        "pip install https://github.com/kpu/kenlm/archive/master.zip",
 | 
			
		||||
        "pip install .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm,video]",
 | 
			
		||||
    ],
 | 
			
		||||
    pytest_options={"rA": None},
 | 
			
		||||
    tests_to_run="tests/pipelines/"
 | 
			
		||||
@ -208,7 +253,7 @@ pipelines_tf_job = CircleCIJob(
 | 
			
		||||
    "pipelines_tf",
 | 
			
		||||
    install_steps=[
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[sklearn,tf-cpu,testing,sentencepiece]",
 | 
			
		||||
        "pip install .[sklearn,tf-cpu,testing,sentencepiece,vision]",
 | 
			
		||||
        "pip install tensorflow_probability",
 | 
			
		||||
    ],
 | 
			
		||||
    pytest_options={"rA": None},
 | 
			
		||||
@ -307,8 +352,8 @@ onnx_job = CircleCIJob(
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
layoutlm_job = CircleCIJob(
 | 
			
		||||
    "layoutlmv2_and_v3",
 | 
			
		||||
exotic_models_job = CircleCIJob(
 | 
			
		||||
    "exotic_models",
 | 
			
		||||
    install_steps=[
 | 
			
		||||
        "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev",
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
@ -317,13 +362,29 @@ layoutlm_job = CircleCIJob(
 | 
			
		||||
        "pip install 'git+https://github.com/facebookresearch/detectron2.git'",
 | 
			
		||||
        "sudo apt install tesseract-ocr",
 | 
			
		||||
        "pip install pytesseract",
 | 
			
		||||
        "pip install natten",
 | 
			
		||||
    ],
 | 
			
		||||
    tests_to_run=[
 | 
			
		||||
        "tests/models/*layoutlmv*",
 | 
			
		||||
        "tests/models/*nat",
 | 
			
		||||
    ],
 | 
			
		||||
    tests_to_run="tests/models/*layoutlmv*",
 | 
			
		||||
    pytest_num_workers=1,
 | 
			
		||||
    pytest_options={"durations": 100},
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
repo_utils_job = CircleCIJob(
 | 
			
		||||
    "repo_utils",
 | 
			
		||||
    install_steps=[
 | 
			
		||||
        "pip install --upgrade pip",
 | 
			
		||||
        "pip install .[quality,testing]",
 | 
			
		||||
    ],
 | 
			
		||||
    parallelism=None,
 | 
			
		||||
    pytest_num_workers=1,
 | 
			
		||||
    resource_class=None,
 | 
			
		||||
    tests_to_run="tests/repo_utils",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
REGULAR_TESTS = [
 | 
			
		||||
    torch_and_tf_job,
 | 
			
		||||
    torch_and_flax_job,
 | 
			
		||||
@ -333,7 +394,7 @@ REGULAR_TESTS = [
 | 
			
		||||
    custom_tokenizers_job,
 | 
			
		||||
    hub_job,
 | 
			
		||||
    onnx_job,
 | 
			
		||||
    layoutlm_job,
 | 
			
		||||
    exotic_models_job,
 | 
			
		||||
]
 | 
			
		||||
EXAMPLES_TESTS = [
 | 
			
		||||
    examples_torch_job,
 | 
			
		||||
@ -344,11 +405,13 @@ PIPELINE_TESTS = [
 | 
			
		||||
    pipelines_torch_job,
 | 
			
		||||
    pipelines_tf_job,
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
REPO_UTIL_TESTS = [repo_utils_job]
 | 
			
		||||
 | 
			
		||||
def create_circleci_config(folder=None):
 | 
			
		||||
    if folder is None:
 | 
			
		||||
        folder = os.getcwd()
 | 
			
		||||
    # Used in CircleCIJob.to_dict() to expand the test list (for using parallelism)
 | 
			
		||||
    os.environ["test_preparation_dir"] = folder
 | 
			
		||||
    jobs = []
 | 
			
		||||
    all_test_file = os.path.join(folder, "test_list.txt")
 | 
			
		||||
    if os.path.exists(all_test_file):
 | 
			
		||||
@ -371,10 +434,18 @@ def create_circleci_config(folder=None):
 | 
			
		||||
    example_file = os.path.join(folder, "examples_test_list.txt")
 | 
			
		||||
    if os.path.exists(example_file) and os.path.getsize(example_file) > 0:
 | 
			
		||||
        jobs.extend(EXAMPLES_TESTS)
 | 
			
		||||
    
 | 
			
		||||
    repo_util_file = os.path.join(folder, "test_repo_utils.txt")
 | 
			
		||||
    if os.path.exists(repo_util_file) and os.path.getsize(repo_util_file) > 0:
 | 
			
		||||
        jobs.extend(REPO_UTIL_TESTS)
 | 
			
		||||
 | 
			
		||||
    if len(jobs) > 0:
 | 
			
		||||
        config = {"version": "2.1"}
 | 
			
		||||
        config["parameters"] = {"tests_to_run": {"type": "string", "default": test_list}}
 | 
			
		||||
        config["parameters"] = {
 | 
			
		||||
            # Only used to accept the parameters from the trigger
 | 
			
		||||
            "nightly": {"type": "boolean", "default": False},
 | 
			
		||||
            "tests_to_run": {"type": "string", "default": test_list},
 | 
			
		||||
        }
 | 
			
		||||
        config["jobs"] = {j.job_name: j.to_dict() for j in jobs}
 | 
			
		||||
        config["workflows"] = {"version": 2, "run_tests": {"jobs": [j.job_name for j in jobs]}}
 | 
			
		||||
        with open(os.path.join(folder, "generated_config.yml"), "w") as f:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										74
									
								
								.github/ISSUE_TEMPLATE/bug-report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										74
									
								
								.github/ISSUE_TEMPLATE/bug-report.yml
									
									
									
									
										vendored
									
									
								
							@ -17,58 +17,54 @@ body:
 | 
			
		||||
      description: |
 | 
			
		||||
        Your issue will be replied to more quickly if you can figure out the right person to tag with @
 | 
			
		||||
        If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 | 
			
		||||
        
 | 
			
		||||
        All issues are read by one of the core maintainers, so if you don't know who to tag, just leave this blank and
 | 
			
		||||
        a core maintainer will ping the right person.
 | 
			
		||||
        
 | 
			
		||||
        Please tag fewer than 3 people.
 | 
			
		||||
        
 | 
			
		||||
        Models:
 | 
			
		||||
 | 
			
		||||
          - ALBERT, BERT, XLM, DeBERTa, DeBERTa-v2, ELECTRA, MobileBert, SqueezeBert: `@LysandreJik`
 | 
			
		||||
          - T5, Pegasus, EncoderDecoder: `@patrickvonplaten`
 | 
			
		||||
          - Blenderbot, MBART, BART, Marian, Pegasus: `@patil-suraj`
 | 
			
		||||
          - Reformer, TransfoXL, XLNet, FNet: `@patrickvonplaten`
 | 
			
		||||
          - Longformer, BigBird: `@ydshieh`
 | 
			
		||||
          - FSMT: `@stas00`
 | 
			
		||||
          - Funnel: `@sgugger`
 | 
			
		||||
          - GPT-2, GPT: `@patil-suraj`, `@patrickvonplaten`, `@LysandreJik`
 | 
			
		||||
          - RAG, DPR: `@patrickvonplaten`, `@lhoestq`
 | 
			
		||||
          - TensorFlow: `@Rocketknight1`
 | 
			
		||||
          - JAX/Flax: `@patil-suraj`
 | 
			
		||||
          - TAPAS, LayoutLM, LayoutLMv2, LUKE, ViT, BEiT, DEiT, DETR, CANINE: `@NielsRogge`
 | 
			
		||||
          - GPT-Neo, GPT-J, CLIP: `@patil-suraj`
 | 
			
		||||
          - Wav2Vec2, HuBERT, UniSpeech, UniSpeechSAT, SEW, SEW-D: `@patrickvonplaten`, `@anton-l`
 | 
			
		||||
          - SpeechEncoderDecoder, Speech2Text, Speech2Text2: `@sanchit-gandhi`, `@patrickvonplaten`, `@anton-l`
 | 
			
		||||
          
 | 
			
		||||
          If the model isn't in the list, ping `@LysandreJik` who will redirect you to the correct contributor.
 | 
			
		||||
 | 
			
		||||
          - text models: @ArthurZucker and @younesbelkada
 | 
			
		||||
          - vision models: @amyeroberts and @NielsRogge
 | 
			
		||||
          - speech models: @sanchit-gandhi
 | 
			
		||||
          - graph models: @clefourrier
 | 
			
		||||
        
 | 
			
		||||
        Library:
 | 
			
		||||
          - Benchmarks: `@patrickvonplaten`
 | 
			
		||||
          - Deepspeed: `@stas00`
 | 
			
		||||
          - Ray/raytune: `@richardliaw`, `@amogkam`
 | 
			
		||||
          - Text generation: `@patrickvonplaten`, `@Narsil`, `@gante`
 | 
			
		||||
          - Tokenizers: `@SaulLu`
 | 
			
		||||
          - Trainer: `@sgugger`
 | 
			
		||||
          - Pipelines: `@Narsil`
 | 
			
		||||
          - Speech: `@patrickvonplaten`, `@anton-l`, `@sanchit-gandhi`
 | 
			
		||||
          - Vision: `@NielsRogge`, `@sgugger`
 | 
			
		||||
 | 
			
		||||
        Documentation: `@sgugger`, `@stevhliu`
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
          - flax: @sanchit-gandhi
 | 
			
		||||
          - generate: @gante
 | 
			
		||||
          - pipelines: @Narsil
 | 
			
		||||
          - tensorflow: @gante and @Rocketknight1
 | 
			
		||||
          - tokenizers: @ArthurZucker
 | 
			
		||||
          - trainer: @sgugger
 | 
			
		||||
        
 | 
			
		||||
        Integrations:
 | 
			
		||||
        
 | 
			
		||||
          - deepspeed: HF Trainer: @stas00, Accelerate: @pacman100
 | 
			
		||||
          - ray/raytune: @richardliaw, @amogkam
 | 
			
		||||
        
 | 
			
		||||
        Documentation: @sgugger, @stevhliu and @MKhalusova
 | 
			
		||||
        
 | 
			
		||||
        Model hub:
 | 
			
		||||
 | 
			
		||||
          - for issues with a model, report at https://discuss.huggingface.co/ and tag the model's creator.
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
        HF projects:
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
          - accelerate: [different repo](https://github.com/huggingface/accelerate)
 | 
			
		||||
          - datasets: [different repo](https://github.com/huggingface/datasets)
 | 
			
		||||
          - diffusers: [different repo](https://github.com/huggingface/diffusers)
 | 
			
		||||
          - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
 | 
			
		||||
        
 | 
			
		||||
        Maintained examples (not research project or legacy):
 | 
			
		||||
        
 | 
			
		||||
          - Flax: @sanchit-gandhi
 | 
			
		||||
          - PyTorch: @sgugger
 | 
			
		||||
          - TensorFlow: @Rocketknight1
 | 
			
		||||
 | 
			
		||||
        Examples:
 | 
			
		||||
        Research projects are not maintained and should be taken as is.
 | 
			
		||||
 | 
			
		||||
          - maintained examples (not research project or legacy): `@sgugger`, `@patil-suraj`
 | 
			
		||||
 | 
			
		||||
        For research projetcs, please ping the contributor directly. For example, on the following projects:
 | 
			
		||||
 | 
			
		||||
          - research_projects/bert-loses-patience: `@JetRunner`
 | 
			
		||||
          - research_projects/distillation: `@VictorSanh`
 | 
			
		||||
      placeholder: "@Username ..."
 | 
			
		||||
 | 
			
		||||
  - type: checkboxes
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								.github/ISSUE_TEMPLATE/i18n.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								.github/ISSUE_TEMPLATE/i18n.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
---
 | 
			
		||||
name: 🌐 Translating a new language?
 | 
			
		||||
about: Start a new translation effort in your language
 | 
			
		||||
title: '[i18n-<languageCode>] Translating docs to <languageName>'
 | 
			
		||||
labels: WIP
 | 
			
		||||
assignees: ''
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
Note: Please search to see if an issue already exists for the language you are trying to translate.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
Hi!
 | 
			
		||||
 | 
			
		||||
Let's bring the documentation to all the <languageName>-speaking community 🌐 (currently 0 out of 267 complete)
 | 
			
		||||
 | 
			
		||||
Who would want to translate? Please follow the 🤗 [TRANSLATING guide](https://github.com/huggingface/transformers/blob/main/docs/TRANSLATING.md). Here is a list of the files ready for translation. Let us know in this issue if you'd like to translate any, and we'll add your name to the list.
 | 
			
		||||
 | 
			
		||||
Some notes:
 | 
			
		||||
 | 
			
		||||
* Please translate using an informal tone (imagine you are talking with a friend about transformers 🤗).
 | 
			
		||||
* Please translate in a gender-neutral way.
 | 
			
		||||
* Add your translations to the folder called `<languageCode>` inside the [source folder](https://github.com/huggingface/transformers/tree/main/docs/source).
 | 
			
		||||
* Register your translation in `<languageCode>/_toctree.yml`; please follow the order of the [English version](https://github.com/huggingface/transformers/blob/main/docs/source/en/_toctree.yml).
 | 
			
		||||
* Once you're finished, open a pull request and tag this issue by including #issue-number in the description, where issue-number is the number of this issue. Please ping @ArthurZucker, @sgugger for review.
 | 
			
		||||
* 🙋 If you'd like others to help you with the translation, you can also post in the 🤗 [forums](https://discuss.huggingface.co/).
 | 
			
		||||
 | 
			
		||||
## Get Started section
 | 
			
		||||
 | 
			
		||||
- [ ] [index.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/index.mdx) https://github.com/huggingface/transformers/pull/20180
 | 
			
		||||
- [ ] [quicktour.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/quicktour.mdx) (waiting for initial PR to go through)
 | 
			
		||||
- [ ] [installation.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/installation.mdx).
 | 
			
		||||
 | 
			
		||||
## Tutorial section
 | 
			
		||||
- [ ] [pipeline_tutorial.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/pipeline_tutorial.mdx)
 | 
			
		||||
- [ ]  [autoclass_tutorial.mdx](https://github.com/huggingface/transformers/blob/master/docs/source/autoclass_tutorial.mdx)
 | 
			
		||||
- [ ]  [preprocessing.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/preprocessing.mdx)
 | 
			
		||||
- [ ]  [training.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/training.mdx)
 | 
			
		||||
- [ ]  [accelerate.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/accelerate.mdx)
 | 
			
		||||
- [ ]  [model_sharing.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_sharing.mdx)
 | 
			
		||||
- [ ]  [multilingual.mdx](https://github.com/huggingface/transformers/blob/main/docs/source/en/multilingual.mdx)
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
Keep on adding more as you go 🔥
 | 
			
		||||
-->
 | 
			
		||||
							
								
								
									
										40
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							@ -39,36 +39,38 @@ members/contributors who may be interested in your PR.
 | 
			
		||||
 | 
			
		||||
Models:
 | 
			
		||||
 | 
			
		||||
- albert, bert, xlm: @LysandreJik
 | 
			
		||||
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
 | 
			
		||||
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
 | 
			
		||||
- fsmt: @stas00
 | 
			
		||||
- funnel: @sgugger
 | 
			
		||||
- gpt2: @patrickvonplaten, @LysandreJik
 | 
			
		||||
- rag: @patrickvonplaten, @lhoestq
 | 
			
		||||
- tensorflow: @LysandreJik
 | 
			
		||||
- text models: @ArthurZucker and @younesbelkada
 | 
			
		||||
- vision models: @amyeroberts and @NielsRogge
 | 
			
		||||
- speech models: @sanchit-gandhi
 | 
			
		||||
- graph models: @clefourrier
 | 
			
		||||
 | 
			
		||||
Library:
 | 
			
		||||
 | 
			
		||||
- benchmarks: @patrickvonplaten
 | 
			
		||||
- deepspeed: @stas00
 | 
			
		||||
- ray/raytune: @richardliaw, @amogkam
 | 
			
		||||
- text generation: @patrickvonplaten
 | 
			
		||||
- tokenizers: @n1t0, @LysandreJik
 | 
			
		||||
- flax: @sanchit-gandhi
 | 
			
		||||
- generate: @gante
 | 
			
		||||
- pipelines: @Narsil
 | 
			
		||||
- tensorflow: @gante and @Rocketknight1
 | 
			
		||||
- tokenizers: @ArthurZucker
 | 
			
		||||
- trainer: @sgugger
 | 
			
		||||
- pipelines: @LysandreJik
 | 
			
		||||
 | 
			
		||||
Documentation: @sgugger
 | 
			
		||||
Integrations:
 | 
			
		||||
 | 
			
		||||
- deepspeed: HF Trainer: @stas00, Accelerate: @pacman100
 | 
			
		||||
- ray/raytune: @richardliaw, @amogkam
 | 
			
		||||
 | 
			
		||||
Documentation: @sgugger, @stevhliu and @MKhalusova
 | 
			
		||||
 | 
			
		||||
HF projects:
 | 
			
		||||
 | 
			
		||||
- accelerate: [different repo](https://github.com/huggingface/accelerate)
 | 
			
		||||
- datasets: [different repo](https://github.com/huggingface/datasets)
 | 
			
		||||
- diffusers: [different repo](https://github.com/huggingface/diffusers)
 | 
			
		||||
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
 | 
			
		||||
 | 
			
		||||
Examples:
 | 
			
		||||
Maintained examples (not research project or legacy):
 | 
			
		||||
 | 
			
		||||
- maintained examples (not research project or legacy): @sgugger, @patil-suraj
 | 
			
		||||
- research_projects/bert-loses-patience: @JetRunner
 | 
			
		||||
- research_projects/distillation: @VictorSanh
 | 
			
		||||
- Flax: @sanchit-gandhi
 | 
			
		||||
- PyTorch: @sgugger
 | 
			
		||||
- TensorFlow: @Rocketknight1
 | 
			
		||||
 | 
			
		||||
 -->
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								.github/workflows/add-model-like.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/add-model-like.yml
									
									
									
									
										vendored
									
									
								
							@ -16,7 +16,7 @@ jobs:
 | 
			
		||||
    name: "Add new model like template tests"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: |
 | 
			
		||||
@ -74,7 +74,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: run_all_tests_new_models_test_reports
 | 
			
		||||
          path: reports/tests_new_models
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										76
									
								
								.github/workflows/build-docker-images.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										76
									
								
								.github/workflows/build-docker-images.yml
									
									
									
									
										vendored
									
									
								
							@ -24,19 +24,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-all-latest-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -49,7 +49,7 @@ jobs:
 | 
			
		||||
        # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
 | 
			
		||||
        # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
 | 
			
		||||
        if: inputs.image_postfix != '-push-ci'
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-all-latest-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -65,19 +65,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-all-latest-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -92,32 +92,50 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-pytorch-deepspeed-latest-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
            REF=main
 | 
			
		||||
          push: true
 | 
			
		||||
          tags: huggingface/transformers-pytorch-deepspeed-latest-gpu${{ inputs.image_postfix }}
 | 
			
		||||
 | 
			
		||||
  # Can't build 2 images in a single job `latest-torch-deepspeed-docker` (for `nvcr.io/nvidia`)
 | 
			
		||||
  latest-torch-deepspeed-docker-for-push-ci-daily-build:
 | 
			
		||||
    name: "Latest PyTorch + DeepSpeed (Push CI - Daily Build)"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      # Push CI images still need to be re-built daily
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push (for Push CI) in a daily basis
 | 
			
		||||
        # This condition allows `schedule` events, or `push` events that trigger this workflow NOT via `workflow_call`.
 | 
			
		||||
        # The later case is useful for manual image building for debugging purpose. Use another tag in this case!
 | 
			
		||||
        if: inputs.image_postfix != '-push-ci'
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-pytorch-deepspeed-latest-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -133,19 +151,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-pytorch-deepspeed-nightly-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -161,19 +179,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-doc-builder
 | 
			
		||||
          push: true
 | 
			
		||||
@ -187,19 +205,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-pytorch-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -215,19 +233,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-tensorflow-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
 | 
			
		||||
@ -20,19 +20,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-past-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -52,19 +52,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-past-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
@ -84,19 +84,19 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      -
 | 
			
		||||
        name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
        uses: docker/setup-buildx-action@v2
 | 
			
		||||
      -
 | 
			
		||||
        name: Check out code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
      -
 | 
			
		||||
        name: Login to DockerHub
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        uses: docker/login-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
 | 
			
		||||
      -
 | 
			
		||||
        name: Build and push
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        uses: docker/build-push-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          context: ./docker/transformers-past-gpu
 | 
			
		||||
          build-args: |
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/build_documentation.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build_documentation.yml
									
									
									
									
										vendored
									
									
								
							@ -15,6 +15,6 @@ jobs:
 | 
			
		||||
      commit_sha: ${{ github.sha }}
 | 
			
		||||
      package: transformers
 | 
			
		||||
      notebook_folder: transformers_doc
 | 
			
		||||
      languages: de en es it pt
 | 
			
		||||
      languages: de en es it ko pt zh
 | 
			
		||||
    secrets:
 | 
			
		||||
      token: ${{ secrets.HUGGINGFACE_PUSH }}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/build_pr_documentation.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build_pr_documentation.yml
									
									
									
									
										vendored
									
									
								
							@ -14,4 +14,4 @@ jobs:
 | 
			
		||||
      commit_sha: ${{ github.event.pull_request.head.sha }}
 | 
			
		||||
      pr_number: ${{ github.event.number }}
 | 
			
		||||
      package: transformers
 | 
			
		||||
      languages: de en es it pt
 | 
			
		||||
      languages: de en es it ko pt zh
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								.github/workflows/check_runner_status.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/check_runner_status.yml
									
									
									
									
										vendored
									
									
								
							@ -23,7 +23,7 @@ jobs:
 | 
			
		||||
      offline_runners: ${{ steps.set-offline_runners.outputs.offline_runners }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ jobs:
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        run: |
 | 
			
		||||
          offline_runners=$(python3 -c 'fp = open("offline_runners.txt"); failed = fp.read(); fp.close(); print(failed)')
 | 
			
		||||
          echo "::set-output name=offline_runners::$offline_runners"
 | 
			
		||||
          echo "offline_runners=$offline_runners" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
  send_results:
 | 
			
		||||
    name: Send results to webhook
 | 
			
		||||
@ -48,8 +48,8 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "Runner availability: ${{ needs.check_runner_status.result }}"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
      - name: Send message to Slack
 | 
			
		||||
        env:
 | 
			
		||||
          CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								.github/workflows/doctests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/doctests.yml
									
									
									
									
										vendored
									
									
								
							@ -6,7 +6,7 @@ on:
 | 
			
		||||
      - doctest*
 | 
			
		||||
  repository_dispatch:
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: "0 0 * * *"
 | 
			
		||||
    - cron: "0 2 * * *"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
@ -25,7 +25,7 @@ jobs:
 | 
			
		||||
      image: huggingface/transformers-all-latest-gpu
 | 
			
		||||
      options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - name: NVIDIA-SMI
 | 
			
		||||
        run: |
 | 
			
		||||
          nvidia-smi
 | 
			
		||||
@ -53,7 +53,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: doc_tests_gpu_test_reports
 | 
			
		||||
          path: reports/doc_tests_gpu
 | 
			
		||||
@ -65,8 +65,8 @@ jobs:
 | 
			
		||||
    if: always()
 | 
			
		||||
    needs: [run_doctests]
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
      - name: Send message to Slack
 | 
			
		||||
        env:
 | 
			
		||||
          CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								.github/workflows/model-templates.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/model-templates.yml
									
									
									
									
										vendored
									
									
								
							@ -10,7 +10,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout repository
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: |
 | 
			
		||||
@ -75,7 +75,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: run_all_tests_templates_test_reports
 | 
			
		||||
          path: reports/tests_templates
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										31
									
								
								.github/workflows/self-nightly-scheduled.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/self-nightly-scheduled.yml
									
									
									
									
										vendored
									
									
								
							@ -28,7 +28,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
@ -75,11 +75,15 @@ jobs:
 | 
			
		||||
          rm -rf tests/models/__pycache__
 | 
			
		||||
          rm -rf reports
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - id: set-matrix
 | 
			
		||||
        name: Identify models to test
 | 
			
		||||
        working-directory: /transformers/tests
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')"
 | 
			
		||||
          echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
      - name: NVIDIA-SMI
 | 
			
		||||
        run: |
 | 
			
		||||
@ -122,6 +126,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -133,7 +141,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -175,6 +183,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -186,7 +198,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -228,6 +240,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: |
 | 
			
		||||
@ -240,7 +256,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_torch_cuda_extensions_gpu_test_reports
 | 
			
		||||
          path: /workspace/transformers/reports/${{ matrix.machine_type }}_tests_torch_cuda_extensions_gpu
 | 
			
		||||
@ -266,8 +282,8 @@ jobs:
 | 
			
		||||
          echo "Runner status: ${{ needs.check_runners.result }}"
 | 
			
		||||
          echo "Setup status: ${{ needs.setup.result }}"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
      - name: Send message to Slack
 | 
			
		||||
        env:
 | 
			
		||||
          CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }}
 | 
			
		||||
@ -283,4 +299,5 @@ jobs:
 | 
			
		||||
        # `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install slack_sdk
 | 
			
		||||
          pip show slack_sdk
 | 
			
		||||
          python utils/notification_service.py "${{ needs.setup.outputs.matrix }}"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										27
									
								
								.github/workflows/self-past.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/self-past.yml
									
									
									
									
										vendored
									
									
								
							@ -37,7 +37,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
@ -83,12 +83,16 @@ jobs:
 | 
			
		||||
          rm -rf tests/models/__pycache__
 | 
			
		||||
          rm -rf reports
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - id: set-matrix
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        name: Identify models to test
 | 
			
		||||
        run: |
 | 
			
		||||
          cd tests
 | 
			
		||||
          echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')"
 | 
			
		||||
          echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
  run_tests_single_gpu:
 | 
			
		||||
    name: Model tests
 | 
			
		||||
@ -127,6 +131,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -147,7 +155,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -189,6 +197,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -209,7 +221,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -228,8 +240,8 @@ jobs:
 | 
			
		||||
          echo "Runner status: ${{ needs.check_runners.result }}"
 | 
			
		||||
          echo "Setup status: ${{ needs.setup.result }}"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
 | 
			
		||||
      # Create a directory to store test failure tables in the next step
 | 
			
		||||
      - name: Create directory
 | 
			
		||||
@ -250,12 +262,13 @@ jobs:
 | 
			
		||||
        # `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install slack_sdk
 | 
			
		||||
          pip show slack_sdk
 | 
			
		||||
          python utils/notification_service.py "${{ needs.setup.outputs.matrix }}"
 | 
			
		||||
 | 
			
		||||
      # Upload complete failure tables, as they might be big and only truncated versions could be sent to Slack.
 | 
			
		||||
      - name: Failure table artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: test_failure_tables_${{ inputs.framework }}-${{ inputs.version }}
 | 
			
		||||
          path: test_failure_tables
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/self-push-caller.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/self-push-caller.yml
									
									
									
									
										vendored
									
									
								
							@ -32,7 +32,7 @@ jobs:
 | 
			
		||||
          run: |
 | 
			
		||||
            for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
 | 
			
		||||
              if [ `basename "${file}"` = "setup.py" ]; then
 | 
			
		||||
                echo ::set-output name=changed::"1"
 | 
			
		||||
                echo "changed=1" >> $GITHUB_OUTPUT
 | 
			
		||||
              fi
 | 
			
		||||
            done
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										41
									
								
								.github/workflows/self-push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								.github/workflows/self-push.yml
									
									
									
									
										vendored
									
									
								
							@ -32,7 +32,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
@ -112,6 +112,10 @@ jobs:
 | 
			
		||||
          rm -rf tests/models/__pycache__
 | 
			
		||||
          rm -rf reports
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Fetch the tests to run
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        # TODO: add `git-python` in the docker images
 | 
			
		||||
@ -120,7 +124,7 @@ jobs:
 | 
			
		||||
          python3 utils/tests_fetcher.py --diff_with_last_commit | tee test_preparation.txt
 | 
			
		||||
 | 
			
		||||
      - name: Report fetched tests
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: test_fetched
 | 
			
		||||
          path: /transformers/test_preparation.txt
 | 
			
		||||
@ -141,8 +145,8 @@ jobs:
 | 
			
		||||
          fi
 | 
			
		||||
          echo $keys
 | 
			
		||||
          echo $test_map
 | 
			
		||||
          echo "::set-output name=matrix::$keys"
 | 
			
		||||
          echo "::set-output name=test_map::$test_map"
 | 
			
		||||
          echo "matrix=$keys" >> $GITHUB_OUTPUT
 | 
			
		||||
          echo "test_map=$test_map" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
  run_tests_single_gpu:
 | 
			
		||||
    name: Model tests
 | 
			
		||||
@ -212,6 +216,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all non-slow selected tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: |
 | 
			
		||||
@ -224,7 +232,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -297,6 +305,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all non-slow selected tests on GPU
 | 
			
		||||
        env:
 | 
			
		||||
          MKL_SERVICE_FORCE_INTEL: 1
 | 
			
		||||
@ -311,7 +323,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -380,6 +392,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all non-slow selected tests on GPU
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        # TODO: Here we pass all tests in the 2 folders for simplicity. It's better to pass only the identified tests.
 | 
			
		||||
@ -393,7 +409,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_torch_cuda_extensions_gpu_test_reports
 | 
			
		||||
          path: /workspace/transformers/reports/${{ matrix.machine_type }}_tests_torch_cuda_extensions_gpu
 | 
			
		||||
@ -462,6 +478,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all non-slow selected tests on GPU
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        # TODO: Here we pass all tests in the 2 folders for simplicity. It's better to pass only the identified tests.
 | 
			
		||||
@ -475,7 +495,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_torch_cuda_extensions_gpu_test_reports
 | 
			
		||||
          path: /workspace/transformers/reports/${{ matrix.machine_type }}_tests_torch_cuda_extensions_gpu
 | 
			
		||||
@ -525,7 +545,7 @@ jobs:
 | 
			
		||||
          echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}"
 | 
			
		||||
          echo "env.CI_SHA = ${{ env.CI_SHA }}"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
        # To avoid failure when multiple commits are merged into `main` in a short period of time.
 | 
			
		||||
        # Checking out to an old commit beyond the fetch depth will get an error `fatal: reference is not a tree: ...
 | 
			
		||||
        # (Only required for `workflow_run` event, where we get the latest HEAD on `main` instead of the event commit)
 | 
			
		||||
@ -540,7 +560,7 @@ jobs:
 | 
			
		||||
          git checkout ${{ env.CI_SHA }}
 | 
			
		||||
          echo "log = $(git log -n 1)"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
      - name: Send message to Slack
 | 
			
		||||
        env:
 | 
			
		||||
          CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }}
 | 
			
		||||
@ -560,4 +580,5 @@ jobs:
 | 
			
		||||
        # `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install slack_sdk
 | 
			
		||||
          pip show slack_sdk
 | 
			
		||||
          python utils/notification_service.py "${{ needs.setup.outputs.matrix }}"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										118
									
								
								.github/workflows/self-scheduled.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										118
									
								
								.github/workflows/self-scheduled.yml
									
									
									
									
										vendored
									
									
								
							@ -27,7 +27,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
@ -74,11 +74,15 @@ jobs:
 | 
			
		||||
          rm -rf tests/models/__pycache__
 | 
			
		||||
          rm -rf reports
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - id: set-matrix
 | 
			
		||||
        name: Identify models to test
 | 
			
		||||
        working-directory: /transformers/tests
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')"
 | 
			
		||||
          echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
 | 
			
		||||
 | 
			
		||||
      - name: NVIDIA-SMI
 | 
			
		||||
        run: |
 | 
			
		||||
@ -121,6 +125,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -132,7 +140,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
@ -174,6 +182,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }}
 | 
			
		||||
@ -185,14 +197,18 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
 | 
			
		||||
 | 
			
		||||
  run_examples_gpu:
 | 
			
		||||
    name: Examples directory
 | 
			
		||||
    runs-on: [self-hosted, single-gpu-docker]
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        machine_type: [single-gpu]
 | 
			
		||||
    runs-on: ${{ format('{0}-{1}', matrix.machine_type, 'docker') }}
 | 
			
		||||
    container:
 | 
			
		||||
      image: huggingface/transformers-all-latest-gpu
 | 
			
		||||
      options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
 | 
			
		||||
@ -211,23 +227,27 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run examples tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install -r examples/pytorch/_tests_requirements.txt
 | 
			
		||||
          python3 -m pytest -v --make-reports=single-gpu_examples_gpu examples/pytorch
 | 
			
		||||
          python3 -m pytest -v --make-reports=${{ matrix.machine_type }}_examples_gpu examples/pytorch
 | 
			
		||||
 | 
			
		||||
      - name: Failure short reports
 | 
			
		||||
        if: ${{ failure() }}
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        run: cat /transformers/reports/single-gpu_examples_gpu/failures_short.txt
 | 
			
		||||
        run: cat /transformers/reports/${{ matrix.machine_type }}_examples_gpu/failures_short.txt
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: single-gpu_run_examples_gpu
 | 
			
		||||
          path: /transformers/reports/single-gpu_examples_gpu
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_examples_gpu
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_examples_gpu
 | 
			
		||||
 | 
			
		||||
  run_pipelines_torch_gpu:
 | 
			
		||||
    name: PyTorch pipelines
 | 
			
		||||
@ -254,6 +274,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all pipeline tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: |
 | 
			
		||||
@ -266,7 +290,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_torch_pipeline_gpu
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_torch_pipeline_gpu
 | 
			
		||||
@ -297,6 +321,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all pipeline tests on GPU
 | 
			
		||||
        working-directory: /transformers
 | 
			
		||||
        run: |
 | 
			
		||||
@ -309,7 +337,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_tf_pipeline_gpu
 | 
			
		||||
          path: /transformers/reports/${{ matrix.machine_type }}_tests_tf_pipeline_gpu
 | 
			
		||||
@ -349,6 +377,10 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          python utils/print_env.py
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Run all tests on GPU
 | 
			
		||||
        working-directory: /workspace/transformers
 | 
			
		||||
        run: |
 | 
			
		||||
@ -361,13 +393,13 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Test suite reports artifacts
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: ${{ matrix.machine_type }}_run_tests_torch_cuda_extensions_gpu_test_reports
 | 
			
		||||
          path: /workspace/transformers/reports/${{ matrix.machine_type }}_tests_torch_cuda_extensions_gpu
 | 
			
		||||
 | 
			
		||||
  send_results:
 | 
			
		||||
    name: Send results to webhook
 | 
			
		||||
  run_extract_warnings:
 | 
			
		||||
    name: Extract warnings in CI artifacts
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: always()
 | 
			
		||||
    needs: [
 | 
			
		||||
@ -381,6 +413,57 @@ jobs:
 | 
			
		||||
      run_pipelines_torch_gpu,
 | 
			
		||||
      run_all_tests_torch_cuda_extensions_gpu
 | 
			
		||||
    ]
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout transformers
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
 | 
			
		||||
      - name: Install transformers
 | 
			
		||||
        run: pip install transformers
 | 
			
		||||
 | 
			
		||||
      - name: Show installed libraries and their versions
 | 
			
		||||
        run: pip freeze
 | 
			
		||||
 | 
			
		||||
      - name: Create output directory
 | 
			
		||||
        run: mkdir warnings_in_ci
 | 
			
		||||
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          path: warnings_in_ci
 | 
			
		||||
 | 
			
		||||
      - name: Show artifacts
 | 
			
		||||
        run: echo "$(python3 -c 'import os; d = os.listdir(); print(d)')"
 | 
			
		||||
        working-directory: warnings_in_ci
 | 
			
		||||
 | 
			
		||||
      - name: Extract warnings in CI artifacts
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 utils/extract_warnings.py --workflow_run_id ${{ github.run_id }} --output_dir warnings_in_ci --token ${{ secrets.ACCESS_REPO_INFO_TOKEN }} --from_gh
 | 
			
		||||
          echo "$(python3 -c 'import os; import json; fp = open("warnings_in_ci/selected_warnings.json"); d = json.load(fp); d = "\n".join(d) ;print(d)')"
 | 
			
		||||
 | 
			
		||||
      - name: Upload artifact
 | 
			
		||||
        if: ${{ always() }}
 | 
			
		||||
        uses: actions/upload-artifact@v3
 | 
			
		||||
        with:
 | 
			
		||||
          name: warnings_in_ci
 | 
			
		||||
          path: warnings_in_ci/selected_warnings.json
 | 
			
		||||
 | 
			
		||||
  send_results:
 | 
			
		||||
    name: Send results to webhook
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: always()
 | 
			
		||||
    needs: [
 | 
			
		||||
      check_runner_status,
 | 
			
		||||
      check_runners,
 | 
			
		||||
      setup,
 | 
			
		||||
      run_tests_single_gpu,
 | 
			
		||||
      run_tests_multi_gpu,
 | 
			
		||||
      run_examples_gpu,
 | 
			
		||||
      run_pipelines_tf_gpu,
 | 
			
		||||
      run_pipelines_torch_gpu,
 | 
			
		||||
      run_all_tests_torch_cuda_extensions_gpu,
 | 
			
		||||
      run_extract_warnings
 | 
			
		||||
    ]
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Preliminary job status
 | 
			
		||||
        shell: bash
 | 
			
		||||
@ -390,8 +473,8 @@ jobs:
 | 
			
		||||
          echo "Runner status: ${{ needs.check_runners.result }}"
 | 
			
		||||
          echo "Setup status: ${{ needs.setup.result }}"
 | 
			
		||||
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/download-artifact@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/download-artifact@v3
 | 
			
		||||
      - name: Send message to Slack
 | 
			
		||||
        env:
 | 
			
		||||
          CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }}
 | 
			
		||||
@ -407,4 +490,5 @@ jobs:
 | 
			
		||||
        # `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install slack_sdk
 | 
			
		||||
          pip show slack_sdk
 | 
			
		||||
          python utils/notification_service.py "${{ needs.setup.outputs.matrix }}"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/update_metdata.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/update_metdata.yml
									
									
									
									
										vendored
									
									
								
							@ -14,7 +14,7 @@ jobs:
 | 
			
		||||
        shell: bash -l {0}
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
      - name: Load cached virtual environment
 | 
			
		||||
        uses: actions/cache@v2
 | 
			
		||||
 | 
			
		||||
@ -7,8 +7,8 @@ We as members, contributors, and leaders pledge to make participation in our
 | 
			
		||||
community a harassment-free experience for everyone, regardless of age, body
 | 
			
		||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
 | 
			
		||||
identity and expression, level of experience, education, socio-economic status,
 | 
			
		||||
nationality, personal appearance, race, religion, or sexual identity
 | 
			
		||||
and orientation.
 | 
			
		||||
nationality, personal appearance, race, caste, color, religion, or sexual
 | 
			
		||||
identity and orientation.
 | 
			
		||||
 | 
			
		||||
We pledge to act and interact in ways that contribute to an open, welcoming,
 | 
			
		||||
diverse, inclusive, and healthy community.
 | 
			
		||||
@ -23,17 +23,17 @@ community include:
 | 
			
		||||
* Giving and gracefully accepting constructive feedback
 | 
			
		||||
* Accepting responsibility and apologizing to those affected by our mistakes,
 | 
			
		||||
  and learning from the experience
 | 
			
		||||
* Focusing on what is best not just for us as individuals, but for the
 | 
			
		||||
  overall community
 | 
			
		||||
* Focusing on what is best not just for us as individuals, but for the overall
 | 
			
		||||
  community
 | 
			
		||||
 | 
			
		||||
Examples of unacceptable behavior include:
 | 
			
		||||
 | 
			
		||||
* The use of sexualized language or imagery, and sexual attention or
 | 
			
		||||
  advances of any kind
 | 
			
		||||
* The use of sexualized language or imagery, and sexual attention or advances of
 | 
			
		||||
  any kind
 | 
			
		||||
* Trolling, insulting or derogatory comments, and personal or political attacks
 | 
			
		||||
* Public or private harassment
 | 
			
		||||
* Publishing others' private information, such as a physical or email
 | 
			
		||||
  address, without their explicit permission
 | 
			
		||||
* Publishing others' private information, such as a physical or email address,
 | 
			
		||||
  without their explicit permission
 | 
			
		||||
* Other conduct which could reasonably be considered inappropriate in a
 | 
			
		||||
  professional setting
 | 
			
		||||
 | 
			
		||||
@ -83,15 +83,15 @@ behavior was inappropriate. A public apology may be requested.
 | 
			
		||||
 | 
			
		||||
### 2. Warning
 | 
			
		||||
 | 
			
		||||
**Community Impact**: A violation through a single incident or series
 | 
			
		||||
of actions.
 | 
			
		||||
**Community Impact**: A violation through a single incident or series of
 | 
			
		||||
actions.
 | 
			
		||||
 | 
			
		||||
**Consequence**: A warning with consequences for continued behavior. No
 | 
			
		||||
interaction with the people involved, including unsolicited interaction with
 | 
			
		||||
those enforcing the Code of Conduct, for a specified period of time. This
 | 
			
		||||
includes avoiding interactions in community spaces as well as external channels
 | 
			
		||||
like social media. Violating these terms may lead to a temporary or
 | 
			
		||||
permanent ban.
 | 
			
		||||
like social media. Violating these terms may lead to a temporary or permanent
 | 
			
		||||
ban.
 | 
			
		||||
 | 
			
		||||
### 3. Temporary Ban
 | 
			
		||||
 | 
			
		||||
@ -107,23 +107,27 @@ Violating these terms may lead to a permanent ban.
 | 
			
		||||
### 4. Permanent Ban
 | 
			
		||||
 | 
			
		||||
**Community Impact**: Demonstrating a pattern of violation of community
 | 
			
		||||
standards, including sustained inappropriate behavior,  harassment of an
 | 
			
		||||
standards, including sustained inappropriate behavior, harassment of an
 | 
			
		||||
individual, or aggression toward or disparagement of classes of individuals.
 | 
			
		||||
 | 
			
		||||
**Consequence**: A permanent ban from any sort of public interaction within
 | 
			
		||||
the community.
 | 
			
		||||
**Consequence**: A permanent ban from any sort of public interaction within the
 | 
			
		||||
community.
 | 
			
		||||
 | 
			
		||||
## Attribution
 | 
			
		||||
 | 
			
		||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
 | 
			
		||||
version 2.0, available at
 | 
			
		||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
 | 
			
		||||
version 2.1, available at
 | 
			
		||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
 | 
			
		||||
 | 
			
		||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
 | 
			
		||||
enforcement ladder](https://github.com/mozilla/diversity).
 | 
			
		||||
 | 
			
		||||
[homepage]: https://www.contributor-covenant.org
 | 
			
		||||
Community Impact Guidelines were inspired by
 | 
			
		||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
 | 
			
		||||
 | 
			
		||||
For answers to common questions about this code of conduct, see the FAQ at
 | 
			
		||||
https://www.contributor-covenant.org/faq. Translations are available at
 | 
			
		||||
https://www.contributor-covenant.org/translations.
 | 
			
		||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
 | 
			
		||||
[https://www.contributor-covenant.org/translations][translations].
 | 
			
		||||
 | 
			
		||||
[homepage]: https://www.contributor-covenant.org
 | 
			
		||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
 | 
			
		||||
[Mozilla CoC]: https://github.com/mozilla/diversity
 | 
			
		||||
[FAQ]: https://www.contributor-covenant.org/faq
 | 
			
		||||
[translations]: https://www.contributor-covenant.org/translations
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										351
									
								
								CONTRIBUTING.md
									
									
									
									
									
								
							
							
						
						
									
										351
									
								
								CONTRIBUTING.md
									
									
									
									
									
								
							@ -14,124 +14,126 @@ See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# How to contribute to transformers?
 | 
			
		||||
# Contribute to 🤗 Transformers
 | 
			
		||||
 | 
			
		||||
Everyone is welcome to contribute, and we value everybody's contribution. Code
 | 
			
		||||
is thus not the only way to help the community. Answering questions, helping
 | 
			
		||||
others, reaching out and improving the documentations are immensely valuable to
 | 
			
		||||
the community.
 | 
			
		||||
contributions are not the only way to help the community. Answering questions, helping
 | 
			
		||||
others, and improving the documentation are also immensely valuable.
 | 
			
		||||
 | 
			
		||||
It also helps us if you spread the word: reference the library from blog posts
 | 
			
		||||
on the awesome projects it made possible, shout out on Twitter every time it has
 | 
			
		||||
helped you, or simply star the repo to say "thank you".
 | 
			
		||||
It also helps us if you spread the word! Reference the library in blog posts
 | 
			
		||||
about the awesome projects it made possible, shout out on Twitter every time it has
 | 
			
		||||
helped you, or simply ⭐️ the repository to say thank you.
 | 
			
		||||
 | 
			
		||||
Whichever way you choose to contribute, please be mindful to respect our
 | 
			
		||||
However you choose to contribute, please be mindful and respect our
 | 
			
		||||
[code of conduct](https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md).
 | 
			
		||||
 | 
			
		||||
## You can contribute in so many ways!
 | 
			
		||||
**This guide was heavily inspired by the awesome [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md).**
 | 
			
		||||
 | 
			
		||||
There are 4 ways you can contribute to transformers:
 | 
			
		||||
* Fixing outstanding issues with the existing code;
 | 
			
		||||
* Implementing new models;
 | 
			
		||||
* Contributing to the examples or to the documentation;
 | 
			
		||||
* Submitting issues related to bugs or desired new features.
 | 
			
		||||
## Ways to contribute
 | 
			
		||||
 | 
			
		||||
In particular, there is a special [Good First
 | 
			
		||||
There are several ways you can contribute to 🤗 Transformers:
 | 
			
		||||
 | 
			
		||||
* Fix outstanding issues with the existing code.
 | 
			
		||||
* Submit issues related to bugs or desired new features.
 | 
			
		||||
* Implement new models.
 | 
			
		||||
* Contribute to the examples or to the documentation.
 | 
			
		||||
 | 
			
		||||
If you don't know where to start, there is a special [Good First
 | 
			
		||||
Issue](https://github.com/huggingface/transformers/contribute) listing. It will give you a list of
 | 
			
		||||
open Issues that are open to anybody to work on. Just comment in the issue that you'd like to work
 | 
			
		||||
on it. In that same listing you will also find some Issues with `Good Second Issue` label. These are
 | 
			
		||||
typically slightly more complicated than the Issues with just `Good First Issue` label. But if you
 | 
			
		||||
feel you know what you're doing, go for it.
 | 
			
		||||
open issues that are beginner-friendly and help you start contributing to open-source. Just comment in the issue that you'd like to work
 | 
			
		||||
on it. 
 | 
			
		||||
 | 
			
		||||
*All are equally valuable to the community.*
 | 
			
		||||
For something slightly more challenging, you can also take a look at the [Good Second Issue](https://github.com/huggingface/transformers/labels/Good%20Second%20Issue) list. In general though, if you feel like you know what you're doing, go for it and we'll help you get there! 🚀
 | 
			
		||||
 | 
			
		||||
## Submitting a new issue or feature request
 | 
			
		||||
> All contributions are equally valuable to the community. 🥰
 | 
			
		||||
 | 
			
		||||
Do your best to follow these guidelines when submitting an issue or a feature
 | 
			
		||||
## Fixing outstanding issues
 | 
			
		||||
 | 
			
		||||
If you notice an issue with the existing code and have a fix in mind, feel free to [start contributing](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#create-a-pull-request) and open a Pull Request!
 | 
			
		||||
 | 
			
		||||
## Submitting a bug-related issue or feature request
 | 
			
		||||
 | 
			
		||||
Do your best to follow these guidelines when submitting a bug-related issue or a feature
 | 
			
		||||
request. It will make it easier for us to come back to you quickly and with good
 | 
			
		||||
feedback.
 | 
			
		||||
 | 
			
		||||
### Did you find a bug?
 | 
			
		||||
 | 
			
		||||
The 🤗 Transformers library is robust and reliable thanks to the users who notify us of
 | 
			
		||||
the problems they encounter. So thank you for reporting an issue.
 | 
			
		||||
The 🤗 Transformers library is robust and reliable thanks to users who report the problems they encounter.
 | 
			
		||||
 | 
			
		||||
First, we would really appreciate it if you could **make sure the bug was not
 | 
			
		||||
already reported** (use the search bar on Github under Issues).
 | 
			
		||||
Before you report an issue, we would really appreciate it if you could **make sure the bug was not
 | 
			
		||||
already reported** (use the search bar on GitHub under Issues). Your issue should also be related to bugs in the library itself, and not your code. If you're unsure whether the bug is in your code or the library, please ask on the [forum](https://discuss.huggingface.co/) first. This helps us respond quicker to fixing issues related to the library versus general questions.
 | 
			
		||||
 | 
			
		||||
Did not find it? :( So we can act quickly on it, please follow these steps:
 | 
			
		||||
Once you've confirmed the bug hasn't already been reported, please include the following information in your issue so we can quickly resolve it:
 | 
			
		||||
 | 
			
		||||
* Include your **OS type and version**, the versions of **Python**, **PyTorch** and
 | 
			
		||||
  **Tensorflow** when applicable;
 | 
			
		||||
* Your **OS type and version** and **Python**, **PyTorch** and
 | 
			
		||||
  **TensorFlow** versions when applicable.
 | 
			
		||||
* A short, self-contained, code snippet that allows us to reproduce the bug in
 | 
			
		||||
  less than 30s;
 | 
			
		||||
* Provide the *full* traceback if an exception is raised.
 | 
			
		||||
  less than 30s.
 | 
			
		||||
* The *full* traceback if an exception is raised.
 | 
			
		||||
* Attach any other additional information, like screenshots, you think may help.
 | 
			
		||||
 | 
			
		||||
To get the OS and software versions automatically, you can run the following command:
 | 
			
		||||
To get the OS and software versions automatically, run the following command:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
transformers-cli env
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
or from the root of the repository the following command:
 | 
			
		||||
You can also run the same command from the root of the repository:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
python src/transformers/commands/transformers_cli.py env
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Do you want a new feature?
 | 
			
		||||
 | 
			
		||||
### Do you want to implement a new model?
 | 
			
		||||
If there is a new feature you'd like to see in 🤗 Transformers, please open an issue and describe:
 | 
			
		||||
 | 
			
		||||
Awesome! Please provide the following information:
 | 
			
		||||
1. What is the *motivation* behind this feature? Is it related to a problem or frustration with the library? Is it a feature related to something you need for a project? Is it something you worked on and think it could benefit the community?
 | 
			
		||||
 | 
			
		||||
* Short description of the model and link to the paper;
 | 
			
		||||
* Link to the implementation if it is open-source;
 | 
			
		||||
   Whatever it is, we'd love to hear about it!
 | 
			
		||||
 | 
			
		||||
2. Describe your requested feature in as much detail as possible. The more you can tell us about it, the better we'll be able to help you.
 | 
			
		||||
3. Provide a *code snippet* that demonstrates the features usage.
 | 
			
		||||
4. If the feature is related to a paper, please include a link.
 | 
			
		||||
 | 
			
		||||
If your issue is well written we're already 80% of the way there by the time you create it.
 | 
			
		||||
 | 
			
		||||
We have added [templates](https://github.com/huggingface/transformers/tree/main/templates) to help you get started with your issue.
 | 
			
		||||
 | 
			
		||||
## Do you want to implement a new model?
 | 
			
		||||
 | 
			
		||||
New models are constantly released and if you want to implement a new model, please provide the following information
 | 
			
		||||
 | 
			
		||||
* A short description of the model and link to the paper.
 | 
			
		||||
* Link to the implementation if it is open-sourced.
 | 
			
		||||
* Link to the model weights if they are available.
 | 
			
		||||
 | 
			
		||||
If you are willing to contribute the model yourself, let us know so we can best
 | 
			
		||||
guide you.
 | 
			
		||||
If you are willing to contribute the model yourself, let us know so we can help you add it to 🤗 Transformers!
 | 
			
		||||
 | 
			
		||||
We have added a **detailed guide and templates** to guide you in the process of adding a new model. You can find them
 | 
			
		||||
in the [`templates`](https://github.com/huggingface/transformers/tree/main/templates) folder.
 | 
			
		||||
We have added a [detailed guide and templates](https://github.com/huggingface/transformers/tree/main/templates) to help you get started with adding a new model, and we also have a more technical guide for [how to add a model to 🤗 Transformers](https://huggingface.co/docs/transformers/add_new_model).
 | 
			
		||||
 | 
			
		||||
### Do you want a new feature (that is not a model)?
 | 
			
		||||
## Do you want to add documentation?
 | 
			
		||||
 | 
			
		||||
A world-class feature request addresses the following points:
 | 
			
		||||
We're always looking for improvements to the documentation that make it more clear and accurate. Please let us know how the documentation can be improved such as typos and any content that is missing, unclear or inaccurate. We'll be happy to make the changes or help you make a contribution if you're interested!
 | 
			
		||||
 | 
			
		||||
1. Motivation first:
 | 
			
		||||
  * Is it related to a problem/frustration with the library? If so, please explain
 | 
			
		||||
    why. Providing a code snippet that demonstrates the problem is best.
 | 
			
		||||
  * Is it related to something you would need for a project? We'd love to hear
 | 
			
		||||
    about it!
 | 
			
		||||
  * Is it something you worked on and think could benefit the community?
 | 
			
		||||
    Awesome! Tell us what problem it solved for you.
 | 
			
		||||
2. Write a *full paragraph* describing the feature;
 | 
			
		||||
3. Provide a **code snippet** that demonstrates its future use;
 | 
			
		||||
4. In case this is related to a paper, please attach a link;
 | 
			
		||||
5. Attach any additional information (drawings, screenshots, etc.) you think may help.
 | 
			
		||||
For more details about how to generate, build, and write the documentation, take a look at the documentation [README](https://github.com/huggingface/transformers/tree/main/docs).
 | 
			
		||||
 | 
			
		||||
If your issue is well written we're already 80% of the way there by the time you
 | 
			
		||||
post it.
 | 
			
		||||
## Create a Pull Request
 | 
			
		||||
 | 
			
		||||
We have added **templates** to guide you in the process of adding a new example script for training or testing the
 | 
			
		||||
models in the library. You can find them in the [`templates`](https://github.com/huggingface/transformers/tree/main/templates)
 | 
			
		||||
folder.
 | 
			
		||||
 | 
			
		||||
## Start contributing! (Pull Requests)
 | 
			
		||||
 | 
			
		||||
Before writing code, we strongly advise you to search through the existing PRs or
 | 
			
		||||
issues to make sure that nobody is already working on the same thing. If you are
 | 
			
		||||
Before writing any code, we strongly advise you to search through the existing PRs or
 | 
			
		||||
issues to make sure nobody is already working on the same thing. If you are
 | 
			
		||||
unsure, it is always a good idea to open an issue to get some feedback.
 | 
			
		||||
 | 
			
		||||
You will need basic `git` proficiency to be able to contribute to
 | 
			
		||||
🤗 Transformers. `git` is not the easiest tool to use but it has the greatest
 | 
			
		||||
manual. Type `git --help` in a shell and enjoy. If you prefer books, [Pro
 | 
			
		||||
You will need basic `git` proficiency to contribute to
 | 
			
		||||
🤗 Transformers. While `git` is not the easiest tool to use, it has the greatest
 | 
			
		||||
manual. Type `git --help` in a shell and enjoy! If you prefer books, [Pro
 | 
			
		||||
Git](https://git-scm.com/book/en/v2) is a very good reference.
 | 
			
		||||
 | 
			
		||||
Follow these steps to start contributing ([supported Python versions](https://github.com/huggingface/transformers/blob/main/setup.py#L426)):
 | 
			
		||||
You'll need **[Python 3.7]((https://github.com/huggingface/transformers/blob/main/setup.py#L426))** or above to contribute to 🤗 Transformers. Follow the steps below to start contributing:
 | 
			
		||||
 | 
			
		||||
1. Fork the [repository](https://github.com/huggingface/transformers) by
 | 
			
		||||
   clicking on the 'Fork' button on the repository's page. This creates a copy of the code
 | 
			
		||||
   clicking on the **[Fork](https://github.com/huggingface/transformers/fork)** button on the repository's page. This creates a copy of the code
 | 
			
		||||
   under your GitHub user account.
 | 
			
		||||
 | 
			
		||||
2. Clone your fork to your local disk, and add the base repository as a remote:
 | 
			
		||||
@ -148,7 +150,7 @@ Follow these steps to start contributing ([supported Python versions](https://gi
 | 
			
		||||
   $ git checkout -b a-descriptive-name-for-my-changes
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   **Do not** work on the `main` branch.
 | 
			
		||||
   🚨 **Do not** work on the `main` branch!
 | 
			
		||||
 | 
			
		||||
4. Set up a development environment by running the following command in a virtual environment:
 | 
			
		||||
 | 
			
		||||
@ -156,25 +158,13 @@ Follow these steps to start contributing ([supported Python versions](https://gi
 | 
			
		||||
   $ pip install -e ".[dev]"
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   (If transformers was already installed in the virtual environment, remove
 | 
			
		||||
   If 🤗 Transformers was already installed in the virtual environment, remove
 | 
			
		||||
   it with `pip uninstall transformers` before reinstalling it in editable
 | 
			
		||||
   mode with the `-e` flag.)
 | 
			
		||||
 | 
			
		||||
   To run the full test suite, you might need the additional dependency on `datasets` which requires a separate source
 | 
			
		||||
   install:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ git clone https://github.com/huggingface/datasets
 | 
			
		||||
   $ cd datasets
 | 
			
		||||
   $ pip install -e .
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   If you have already cloned that repo, you might need to `git pull` to get the most recent changes in the `datasets`
 | 
			
		||||
   library.
 | 
			
		||||
   mode with the `-e` flag.
 | 
			
		||||
   
 | 
			
		||||
   Depending on your OS, you might need to install some external libraries, as well, if the `pip` installation fails.
 | 
			
		||||
   Depending on your OS, you may need to install some external libraries as well if the `pip` installation fails.
 | 
			
		||||
   
 | 
			
		||||
   For macOS, you will likely need [MeCab](https://taku910.github.io/mecab/), which can be installed from Homebrew:
 | 
			
		||||
   For macOS, you will likely need [MeCab](https://taku910.github.io/mecab/) which can be installed from Homebrew:
 | 
			
		||||
   
 | 
			
		||||
   ```bash
 | 
			
		||||
   brew install mecab
 | 
			
		||||
@ -182,23 +172,15 @@ Follow these steps to start contributing ([supported Python versions](https://gi
 | 
			
		||||
 | 
			
		||||
5. Develop the features on your branch.
 | 
			
		||||
 | 
			
		||||
   As you work on the features, you should make sure that the test suite
 | 
			
		||||
   passes. You should run the tests impacted by your changes like this:
 | 
			
		||||
   As you work on your code, you should make sure the test suite
 | 
			
		||||
   passes. Run the tests impacted by your changes like this:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ pytest tests/<TEST_TO_RUN>.py
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   You can also run the full suite with the following command, but it takes
 | 
			
		||||
   a beefy machine to produce a result in a decent amount of time now that
 | 
			
		||||
   Transformers has grown a lot. Here is the command for it:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ make test
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   For more information about tests, check out the
 | 
			
		||||
   [dedicated documentation](https://huggingface.co/docs/transformers/testing)
 | 
			
		||||
   [Testing](https://huggingface.co/docs/transformers/testing) guide.
 | 
			
		||||
 | 
			
		||||
   🤗 Transformers relies on `black` and `isort` to format its source code
 | 
			
		||||
   consistently. After you make changes, apply automatic style corrections and code verifications
 | 
			
		||||
@ -210,7 +192,7 @@ Follow these steps to start contributing ([supported Python versions](https://gi
 | 
			
		||||
 | 
			
		||||
   This target is also optimized to only work with files modified by the PR you're working on.
 | 
			
		||||
 | 
			
		||||
   If you prefer to run the checks one after the other, the following command apply the
 | 
			
		||||
   If you prefer to run the checks one after the other, the following command applies the
 | 
			
		||||
   style corrections:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
@ -218,145 +200,144 @@ Follow these steps to start contributing ([supported Python versions](https://gi
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   🤗 Transformers also uses `flake8` and a few custom scripts to check for coding mistakes. Quality
 | 
			
		||||
   control runs in CI, however you can also run the same checks with:
 | 
			
		||||
   controls are run by the CI, but you can run the same checks with:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ make quality
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Finally we have a lot of scripts that check we didn't forget to update
 | 
			
		||||
   some files when adding a new model, that you can run with
 | 
			
		||||
   Finally, we have a lot of scripts to make sure we didn't forget to update
 | 
			
		||||
   some files when adding a new model. You can run these scripts with:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ make repo-consistency
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   To learn more about those checks and how to fix any issue with them, check out the
 | 
			
		||||
   [documentation](https://huggingface.co/docs/transformers/pr_checks)
 | 
			
		||||
   To learn more about those checks and how to fix any issues with them, check out the
 | 
			
		||||
   [Checks on a Pull Request](https://huggingface.co/docs/transformers/pr_checks) guide.
 | 
			
		||||
 | 
			
		||||
   If you're modifying documents under `docs/source`, make sure to validate that
 | 
			
		||||
   they can still be built. This check also runs in CI. To run a local check
 | 
			
		||||
   make sure you have installed the documentation builder requirements. First you will need to clone the
 | 
			
		||||
   repository containing our tools to build the documentation:
 | 
			
		||||
   
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ pip install git+https://github.com/huggingface/doc-builder
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Then, make sure you have all the dependencies to be able to build the doc with:
 | 
			
		||||
   If you're modifying documents under `docs/source` directory, make sure the documentation can still be built. This check will also run in the CI when you open a pull request. To run a local check
 | 
			
		||||
   make sure you install the documentation builder:
 | 
			
		||||
   
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ pip install ".[docs]"
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Finally run the following command from the root of the repository:
 | 
			
		||||
   Run the following command from the root of the repository:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ doc-builder build transformers docs/source/ --build_dir ~/tmp/test-build
 | 
			
		||||
   $ doc-builder build transformers docs/source/en --build_dir ~/tmp/test-build
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   This will build the documentation in the `~/tmp/test-build` folder where you can inspect the generated
 | 
			
		||||
   Markdown files with your favorite editor. You won't be able to see the final rendering on the website
 | 
			
		||||
   before your PR is merged, we are actively working on adding a tool for this.
 | 
			
		||||
   Markdown files with your favorite editor. You can also preview the docs on GitHub when you open a pull request.
 | 
			
		||||
 | 
			
		||||
   Once you're happy with your changes, add changed files using `git add` and
 | 
			
		||||
   make a commit with `git commit` to record your changes locally:
 | 
			
		||||
   Once you're happy with your changes, add changed files with `git add` and
 | 
			
		||||
   record your changes locally with `git commit`:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ git add modified_file.py
 | 
			
		||||
   $ git commit
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Please write [good commit
 | 
			
		||||
   messages](https://chris.beams.io/posts/git-commit/).
 | 
			
		||||
   Please remember to write [good commit
 | 
			
		||||
   messages](https://chris.beams.io/posts/git-commit/) to clearly communicate the changes you made!
 | 
			
		||||
 | 
			
		||||
   It is a good idea to sync your copy of the code with the original
 | 
			
		||||
   repository regularly. This way you can quickly account for changes:
 | 
			
		||||
   To keep your copy of the code up to date with the original
 | 
			
		||||
   repository, rebase your branch on `upstream/branch` *before* you open a pull request or if requested by a maintainer:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ git fetch upstream
 | 
			
		||||
   $ git rebase upstream/main
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
   Push the changes to your account using:
 | 
			
		||||
   Push your changes to your branch:
 | 
			
		||||
 | 
			
		||||
   ```bash
 | 
			
		||||
   $ git push -u origin a-descriptive-name-for-my-changes
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
6. Once you are satisfied (**and the checklist below is happy too**), go to the
 | 
			
		||||
   webpage of your fork on GitHub. Click on 'Pull request' to send your changes
 | 
			
		||||
   to the project maintainers for review.
 | 
			
		||||
   If you've already opened a pull request, you'll need to force push with the `--force` flag. Otherwise, if the pull request hasn't been opened yet, you can just push your changes normally.
 | 
			
		||||
 | 
			
		||||
7. It's ok if maintainers ask you for changes. It happens to core contributors
 | 
			
		||||
   too! So everyone can see the changes in the Pull request, work in your local
 | 
			
		||||
6. Now you can go to your fork of the repository on GitHub and click on **Pull request** to open a pull request. Make sure you tick off all the boxes in our [checklist](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#pull-request-checklist) below. When you're ready, you can send your changes to the project maintainers for review.
 | 
			
		||||
 | 
			
		||||
7. It's ok if maintainers request changes, it happens to our core contributors
 | 
			
		||||
   too! So everyone can see the changes in the pull request, work in your local
 | 
			
		||||
   branch and push the changes to your fork. They will automatically appear in
 | 
			
		||||
   the pull request.
 | 
			
		||||
 | 
			
		||||
### Pull request checklist
 | 
			
		||||
 | 
			
		||||
### Checklist
 | 
			
		||||
 | 
			
		||||
1. The title of your pull request should be a summary of its contribution;
 | 
			
		||||
2. If your pull request addresses an issue, please mention the issue number in
 | 
			
		||||
   the pull request description to make sure they are linked (and people
 | 
			
		||||
   consulting the issue know you are working on it);
 | 
			
		||||
3. To indicate a work in progress please prefix the title with `[WIP]`. These
 | 
			
		||||
   are useful to avoid duplicated work, and to differentiate it from PRs ready
 | 
			
		||||
   to be merged;
 | 
			
		||||
4. Make sure existing tests pass;
 | 
			
		||||
5. Add high-coverage tests. No quality testing = no merge.
 | 
			
		||||
   - If you are adding a new model, make sure that you use
 | 
			
		||||
     `ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)`, which triggers the common tests.
 | 
			
		||||
☐ The pull request title should summarize your contribution.<br>
 | 
			
		||||
☐ If your pull request addresses an issue, please mention the issue number in the pull
 | 
			
		||||
request description to make sure they are linked (and people viewing the issue know you
 | 
			
		||||
are working on it).<br>
 | 
			
		||||
☐ To indicate a work in progress please prefix the title with `[WIP]`. These are
 | 
			
		||||
useful to avoid duplicated work, and to differentiate it from PRs ready to be merged.
 | 
			
		||||
☐ Make sure existing tests pass.<br>
 | 
			
		||||
☐ If adding a new feature, also add tests for it.<br>
 | 
			
		||||
   - If you are adding a new model, make sure you use
 | 
			
		||||
     `ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)` to trigger the common tests.
 | 
			
		||||
   - If you are adding new `@slow` tests, make sure they pass using
 | 
			
		||||
     `RUN_SLOW=1 python -m pytest tests/test_my_new_model.py`.
 | 
			
		||||
   - If you are adding a new tokenizer, write tests, and make sure
 | 
			
		||||
     `RUN_SLOW=1 python -m pytest tests/test_tokenization_{your_model_name}.py` passes.
 | 
			
		||||
   CircleCI does not run the slow tests, but github actions does every night!
 | 
			
		||||
6. All public methods must have informative docstrings that work nicely with sphinx. See `modeling_bert.py` for an
 | 
			
		||||
   example.
 | 
			
		||||
7. Due to the rapidly growing repository, it is important to make sure that no files that would significantly weigh down the repository are added. This includes images, videos and other non-text files. We prefer to leverage a hf.co hosted `dataset` like
 | 
			
		||||
   the ones hosted on [`hf-internal-testing`](https://huggingface.co/hf-internal-testing) in which to place these files and reference 
 | 
			
		||||
   them by URL. We recommend putting them in the following dataset: [huggingface/documentation-images](https://huggingface.co/datasets/huggingface/documentation-images).
 | 
			
		||||
   If an external contribution, feel free to add the images to your PR and ask a Hugging Face member to migrate your images
 | 
			
		||||
   to this dataset.
 | 
			
		||||
     `RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py`.
 | 
			
		||||
   - If you are adding a new tokenizer, write tests and make sure
 | 
			
		||||
     `RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py` passes.
 | 
			
		||||
   CircleCI does not run the slow tests, but GitHub Actions does every night!<br>
 | 
			
		||||
 | 
			
		||||
See more about the checks run on a pull request in our [PR guide](pr_checks)
 | 
			
		||||
☐ All public methods must have informative docstrings (see
 | 
			
		||||
[`modeling_bert.py`](https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py)
 | 
			
		||||
for an example).<br>
 | 
			
		||||
☐ Due to the rapidly growing repository, don't add any images, videos and other
 | 
			
		||||
non-text files that'll significantly weigh down the repository. Instead, use a Hub
 | 
			
		||||
repository such as [`hf-internal-testing`](https://huggingface.co/hf-internal-testing)
 | 
			
		||||
to host these files and reference them by URL. We recommend placing documentation
 | 
			
		||||
related images in the following repository:
 | 
			
		||||
[huggingface/documentation-images](https://huggingface.co/datasets/huggingface/documentation-images).
 | 
			
		||||
You can open a PR on this dataset repostitory and ask a Hugging Face member to merge it.
 | 
			
		||||
 | 
			
		||||
For more information about the checks run on a pull request, take a look at our [Checks on a Pull Request](https://huggingface.co/docs/transformers/pr_checks) guide.
 | 
			
		||||
 | 
			
		||||
### Tests
 | 
			
		||||
 | 
			
		||||
An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
 | 
			
		||||
the [tests folder](https://github.com/huggingface/transformers/tree/main/tests) and examples tests in the
 | 
			
		||||
[examples folder](https://github.com/huggingface/transformers/tree/main/examples).
 | 
			
		||||
the [tests](https://github.com/huggingface/transformers/tree/main/tests) folder and examples tests in the
 | 
			
		||||
[examples](https://github.com/huggingface/transformers/tree/main/examples) folder.
 | 
			
		||||
 | 
			
		||||
We like `pytest` and `pytest-xdist` because it's faster. From the root of the
 | 
			
		||||
repository, here's how to run tests with `pytest` for the library:
 | 
			
		||||
repository, specify a *path to a subfolder or a test file* to run the test.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ python -m pytest -n auto --dist=loadfile -s -v ./tests/
 | 
			
		||||
$ python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
and for the examples:
 | 
			
		||||
Similarly, for the `examples` directory, specify a *path to a subfolder or test file* to run the test. For example, the following command tests the text classification subfolder in the PyTorch `examples` directory:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ pip install -r examples/xxx/requirements.txt  # only needed the first time
 | 
			
		||||
$ python -m pytest -n auto --dist=loadfile -s -v ./examples/
 | 
			
		||||
$ python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification
 | 
			
		||||
```
 | 
			
		||||
In fact, that's how `make test` and `make test-examples` are implemented (sans the `pip install` line)!
 | 
			
		||||
 | 
			
		||||
You can specify a smaller set of tests in order to test only the feature
 | 
			
		||||
In fact, this is actually how our `make test` and `make test-examples` commands are implemented (not including the `pip install`)!
 | 
			
		||||
 | 
			
		||||
You can also specify a smaller set of tests in order to test only the feature
 | 
			
		||||
you're working on.
 | 
			
		||||
 | 
			
		||||
By default, slow tests are skipped. Set the `RUN_SLOW` environment variable to
 | 
			
		||||
`yes` to run them. This will download many gigabytes of models — make sure you
 | 
			
		||||
have enough disk space and a good Internet connection, or a lot of patience!
 | 
			
		||||
By default, slow tests are skipped but you can set the `RUN_SLOW` environment variable to
 | 
			
		||||
`yes` to run them. This will download many gigabytes of models so make sure you
 | 
			
		||||
have enough disk space, a good internet connection or a lot of patience!
 | 
			
		||||
 | 
			
		||||
<Tip warning={true}>
 | 
			
		||||
 | 
			
		||||
Remember to specify a *path to a subfolder or a test file* to run the test. Otherwise, you'll run all the tests in the `tests` or `examples` folder, which will take a very long time!
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./tests/
 | 
			
		||||
$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./examples/
 | 
			
		||||
$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model
 | 
			
		||||
$ RUN_SLOW=yes python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Likewise, set the `RUN_CUSTOM_TOKENIZERS` environment variable to `yes` to run
 | 
			
		||||
tests for custom tokenizers, which don't run by default either.
 | 
			
		||||
Like the slow tests, custom tokenizer tests are skipped but you can set the `RUN_CUSTOM_TOKENIZERS` environment variable to `yes` to run them.
 | 
			
		||||
 | 
			
		||||
🤗 Transformers uses `pytest` as a test runner only. It doesn't use any
 | 
			
		||||
`pytest`-specific features in the test suite itself.
 | 
			
		||||
@ -369,37 +350,37 @@ $ python -m unittest discover -s tests -t . -v
 | 
			
		||||
$ python -m unittest discover -s examples -t examples -v
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Style guide
 | 
			
		||||
 | 
			
		||||
For documentation strings, 🤗 Transformers follows the [google style](https://google.github.io/styleguide/pyguide.html).
 | 
			
		||||
For documentation strings, 🤗 Transformers follows the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html).
 | 
			
		||||
Check our [documentation writing guide](https://github.com/huggingface/transformers/tree/main/docs#writing-documentation---specification)
 | 
			
		||||
for more information.
 | 
			
		||||
 | 
			
		||||
**This guide was heavily inspired by the awesome [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md).**
 | 
			
		||||
 | 
			
		||||
### Develop on Windows
 | 
			
		||||
 | 
			
		||||
On windows, you need to configure git to transform Windows `CRLF` line endings to Linux `LF` line endings:
 | 
			
		||||
On Windows (unless you're working in [Windows Subsytem for Linux](https://learn.microsoft.com/en-us/windows/wsl/) or WSL), you need to configure git to transform Windows `CRLF` line endings to Linux `LF` line endings:
 | 
			
		||||
 | 
			
		||||
`git config core.autocrlf input`
 | 
			
		||||
```bash
 | 
			
		||||
git config core.autocrlf input
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
One way one can run the make command on Window is to pass by MSYS2:
 | 
			
		||||
One way to run the `make` command on Windows is with MSYS2:
 | 
			
		||||
 | 
			
		||||
1. [Download MSYS2](https://www.msys2.org/), we assume to have it installed in C:\msys64
 | 
			
		||||
2. Open the command line C:\msys64\msys2.exe (it should be available from the start menu)
 | 
			
		||||
3. Run in the shell: `pacman -Syu` and install make with `pacman -S make`
 | 
			
		||||
1. [Download MSYS2](https://www.msys2.org/), and we assume it's installed in `C:\msys64`.
 | 
			
		||||
2. Open the command line `C:\msys64\msys2.exe` (it should be available from the **Start** menu).
 | 
			
		||||
3. Run in the shell: `pacman -Syu` and install `make` with `pacman -S make`.
 | 
			
		||||
4. Add `C:\msys64\usr\bin` to your PATH environment variable.
 | 
			
		||||
 | 
			
		||||
You can now use `make` from any terminal (Powershell, cmd.exe, etc) 🎉
 | 
			
		||||
You can now use `make` from any terminal (Powershell, cmd.exe, etc.)! 🎉
 | 
			
		||||
 | 
			
		||||
### Syncing forked main with upstream (HuggingFace) main
 | 
			
		||||
### Sync a forked repository with upstream main (the Hugging Face repository)
 | 
			
		||||
 | 
			
		||||
To avoid pinging the upstream repository which adds reference notes to each upstream PR and sends unnecessary notifications to the developers involved in these PRs,
 | 
			
		||||
when syncing the main branch of a forked repository, please, follow these steps:
 | 
			
		||||
1. When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead merge directly into the forked main.
 | 
			
		||||
When updating the main branch of a forked repository, please follow these steps to avoid pinging the upstream repository which adds reference notes to each upstream PR, and sends unnecessary notifications to the developers involved in these PRs.
 | 
			
		||||
 | 
			
		||||
1. When possible, avoid syncing with the upstream using a branch and PR on the forked repository. Instead, merge directly into the forked main.
 | 
			
		||||
2. If a PR is absolutely necessary, use the following steps after checking out your branch:
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ git checkout -b your-branch-for-syncing
 | 
			
		||||
$ git pull --squash --no-commit upstream main
 | 
			
		||||
$ git commit -m '<your message without GitHub references>'
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@ limitations under the License.
 | 
			
		||||
 | 
			
		||||
This is an Open Source Project so please be mindful that like in any other project of this kind there is no obligation to answer all requests for help.
 | 
			
		||||
 | 
			
		||||
However, we want to encourage you to ask for help whenever you think it's needed! We are happy about every  question we get because it allows us to better understand your needs, possible misunderstandings, and most importantly a way for you to help us make this library better. That being said, this document's main purpose is to provide guidelines at how you can formulate your requests to increase your chances to be understood and to get support.
 | 
			
		||||
However, we want to encourage you to ask for help whenever you think it's needed! We are happy about every question we get because it allows us to better understand your needs, possible misunderstandings, and most importantly a way for you to help us make this library better. That being said, this document's main purpose is to provide guidelines at how you can formulate your requests to increase your chances to be understood and to get support.
 | 
			
		||||
 | 
			
		||||
There are two main venues to receive support: [the forums](https://discuss.huggingface.co/) and [the GitHub issues](https://github.com/huggingface/transformers/issues).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										53
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								README.md
									
									
									
									
									
								
							@ -44,7 +44,9 @@ limitations under the License.
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> 
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
@ -89,14 +91,22 @@ In Computer Vision:
 | 
			
		||||
- [Image classification with ViT](https://huggingface.co/google/vit-base-patch16-224)
 | 
			
		||||
- [Object Detection with DETR](https://huggingface.co/facebook/detr-resnet-50)
 | 
			
		||||
- [Semantic Segmentation with SegFormer](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512)
 | 
			
		||||
- [Panoptic Segmentation with DETR](https://huggingface.co/facebook/detr-resnet-50-panoptic)
 | 
			
		||||
- [Panoptic Segmentation with MaskFormer](https://huggingface.co/facebook/maskformer-swin-small-coco)
 | 
			
		||||
- [Depth Estimation with DPT](https://huggingface.co/docs/transformers/model_doc/dpt)
 | 
			
		||||
- [Video Classification with VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)
 | 
			
		||||
- [Universal Segmentation with OneFormer](https://huggingface.co/shi-labs/oneformer_ade20k_dinat_large)
 | 
			
		||||
 | 
			
		||||
In Audio:
 | 
			
		||||
- [Automatic Speech Recognition with Wav2Vec2](https://huggingface.co/facebook/wav2vec2-base-960h)
 | 
			
		||||
- [Keyword Spotting with Wav2Vec2](https://huggingface.co/superb/wav2vec2-base-superb-ks)
 | 
			
		||||
- [Audio Classification with Audio Spectrogram Transformer](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593)
 | 
			
		||||
 | 
			
		||||
In Multimodal tasks:
 | 
			
		||||
- [Table Question Answering with TAPAS](https://huggingface.co/google/tapas-base-finetuned-wtq)
 | 
			
		||||
- [Visual Question Answering with ViLT](https://huggingface.co/dandelin/vilt-b32-finetuned-vqa)
 | 
			
		||||
- [Zero-shot Image Classification with CLIP](https://huggingface.co/openai/clip-vit-large-patch14)
 | 
			
		||||
- [Document Question Answering with LayoutLM](https://huggingface.co/impira/layoutlm-document-qa)
 | 
			
		||||
- [Zero-shot Video Classification with X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)
 | 
			
		||||
 | 
			
		||||
**[Write With Transformer](https://transformer.huggingface.co)**, built by the Hugging Face team, is the official demo of this repo’s text generation capabilities.
 | 
			
		||||
 | 
			
		||||
@ -153,7 +163,7 @@ Many tasks have a pre-trained `pipeline` ready to go, in NLP but also in compute
 | 
			
		||||
  'box': {'xmin': 345, 'ymin': 23, 'xmax': 640, 'ymax': 368}}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Here we get a list of objects detected in the image, with a box surrounding the object and a confidence score. Here is the original image on the right, with the predictions displayed on the left:
 | 
			
		||||
Here we get a list of objects detected in the image, with a box surrounding the object and a confidence score. Here is the original image on the left, with the predictions displayed on the right:
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <a><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png" width="400"></a>
 | 
			
		||||
@ -254,13 +264,15 @@ Follow the installation pages of Flax, PyTorch or TensorFlow to see how to insta
 | 
			
		||||
 | 
			
		||||
## Model architectures
 | 
			
		||||
 | 
			
		||||
**[All the model checkpoints](https://huggingface.co/models)** provided by 🤗 Transformers are seamlessly integrated from the huggingface.co [model hub](https://huggingface.co) where they are uploaded directly by [users](https://huggingface.co/users) and [organizations](https://huggingface.co/organizations).
 | 
			
		||||
**[All the model checkpoints](https://huggingface.co/models)** provided by 🤗 Transformers are seamlessly integrated from the huggingface.co [model hub](https://huggingface.co/models) where they are uploaded directly by [users](https://huggingface.co/users) and [organizations](https://huggingface.co/organizations).
 | 
			
		||||
 | 
			
		||||
Current number of checkpoints: 
 | 
			
		||||
 | 
			
		||||
🤗 Transformers currently provides the following architectures (see [here](https://huggingface.co/docs/transformers/model_summary) for a high-level summary of each them):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis.
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (from VinAI Research) released with the paper [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen.
 | 
			
		||||
@ -270,14 +282,19 @@ Current number of checkpoints: ** (from VinAI Research) released with the paper [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) by Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen.
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT): General Visual Representation Learning](https://arxiv.org/abs/1912.11370) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (from Google Research) released with the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) by Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting.
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (from OFA-Sys) released with the paper [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (from OpenAI) released with the paper [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever.
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (from University of Göttingen) released with the paper [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke and Alexander Ecker.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (from Salesforce) released with the paper [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong.
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (from Microsoft Research Asia) released with the paper [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang.
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
 | 
			
		||||
@ -293,19 +310,23 @@ Current number of checkpoints: ** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (from HuggingFace), released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) and a German version of DistilBERT.
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (from Microsoft Research) released with the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (from NAVER), released together with the paper [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) by Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (from Facebook) released with the paper [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (from Intel Labs) released with the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (from Baidu) released with the paper [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu.
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2 and ESMFold** were released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (from OpenAI) released with the paper [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever.
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (from EleutherAI) released in the repository [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) by Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy.
 | 
			
		||||
@ -313,17 +334,20 @@ Current number of checkpoints: ** (from ABEJA) released by Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (from OpenAI) released with the paper [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) by Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever**.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki.
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren.
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (from UCSD, NVIDIA) released with the paper [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (from Facebook) released with the paper [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed.
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (from Berkeley) released with the paper [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) by Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer.
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (from Microsoft Research Asia) released with the paper [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (from Microsoft Research Asia) released with the paper [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) by Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (from Meta AI) released with the paper [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/main/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (from Google AI) released with the paper [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang.
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (from Studio Ousia) released with the paper [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) by Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto.
 | 
			
		||||
@ -332,6 +356,7 @@ Current number of checkpoints: ** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (from Microsoft Research Asia) released with the paper [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei.
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/model_doc/mask2former)** (from FAIR and UIUC) released with the paper [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov.
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
@ -339,13 +364,17 @@ Current number of checkpoints: ** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (from Studio Ousia) released with the paper [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka.
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (from CMU/Google Brain) released with the paper [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou.
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (from Google Inc.) released with the paper [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam.
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (from Google Inc.) released with the paper [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (from Apple) released with the paper [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari.
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (from Google AI) released with the paper [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel.
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (from SHI Labs) released with the paper [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/model_doc/oneformer)** (from SHI Labs) released with the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi.
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
@ -363,6 +392,8 @@ Current number of checkpoints: ** (from Google Research) released with the paper [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/abs/2010.12821) by Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder.
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (from Facebook), released together with the paper [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov.
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/model_doc/roberta-prelayernorm)** (from Facebook) released with the paper [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/model_doc/roc_bert)** (from WeChatAI) released with the paper [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) by HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (from ZhuiyiTechnology), released together with the paper [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/abs/2104.09864) by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu.
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
@ -373,22 +404,28 @@ Current number of checkpoints: ** (from Berkeley) released with the paper [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer.
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (from Microsoft) released with the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) by Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo.
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (from Microsoft) released with the paper [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/model_doc/swin2sr)** (from University of Würzburg) released with the paper [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) by Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte.
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer.
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (from Google AI) released with the paper [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (from Google AI) released in the repository [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (from Microsoft Research) released with the paper [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) by Brandon Smock, Rohith Pesala, Robin Abraham.
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (from Google AI) released with the paper [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) by Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos.
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (from Microsoft Research) released with the paper [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) by Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou.
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)**  (from HuggingFace).
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (from Google/CMU) released with the paper [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov.
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (from Microsoft), released together with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (from Microsoft Research) released with the paper [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang.
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (from Microsoft Research) released with the paper [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu.
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/model_doc/upernet)** (from Peking University) released with the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (from Tsinghua University and Nankai University) released with the paper [Visual Attention Network](https://arxiv.org/abs/2202.09741) by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu.
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (from Multimedia Computing Group, Nanjing University) released with the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (from NAVER AI Lab/Kakao Enterprise/Kakao Brain) released with the paper [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) by Wonjae Kim, Bokyung Son, Ildoo Kim.
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (from UCLA NLP) released with the paper [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) by Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang.
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/model_doc/vit_hybrid)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (from Meta AI) released with the paper [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick.
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (from Meta AI) released with the paper [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (from Facebook AI) released with the paper [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								README_es.md
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								README_es.md
									
									
									
									
									
								
							@ -44,7 +44,9 @@ limitations under the License.
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <b>Español</b> 
 | 
			
		||||
        <b>Español</b> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
@ -56,13 +58,13 @@ limitations under the License.
 | 
			
		||||
    <a href="https://hf.co/course"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/course_banner.png"></a>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
🤗 Transformers aporta miles de modelos preentrenados Para realizar tareas en diferentes modalidades como texto, vision, y audio. 
 | 
			
		||||
🤗 Transformers aporta miles de modelos preentrenados Para realizar tareas en diferentes modalidades como texto, vision, y audio.
 | 
			
		||||
 | 
			
		||||
Estos modelos pueden ser aplicados en:
 | 
			
		||||
 | 
			
		||||
* 📝 Texto, Para tareas como clasificación de texto, extracción de información, responder preguntas, resumir, traducir, generación de texto, en más de 100 idiomas. 
 | 
			
		||||
* 🖼️ Imágenes, para tareas como clasificación de imágenes, detección the objetos, y segmentación. 
 | 
			
		||||
* 🗣️ Audio, para tareas como reconocimiento de voz y clasificación de audio. 
 | 
			
		||||
* 📝 Texto, Para tareas como clasificación de texto, extracción de información, responder preguntas, resumir, traducir, generación de texto, en más de 100 idiomas.
 | 
			
		||||
* 🖼️ Imágenes, para tareas como clasificación de imágenes, detección the objetos, y segmentación.
 | 
			
		||||
* 🗣️ Audio, para tareas como reconocimiento de voz y clasificación de audio.
 | 
			
		||||
 | 
			
		||||
Los modelos de Transformer también pueden realizar tareas en **muchas modalidades combinadas**, como responder pregunstas, reconocimiento de carácteres ópticos,extracción de información de documentos escaneados, clasificación de video, y respuesta de preguntas visuales.
 | 
			
		||||
 | 
			
		||||
@ -90,6 +92,7 @@ En visión de ordenador:
 | 
			
		||||
- [Detección de objetos con DETR](https://huggingface.co/facebook/detr-resnet-50)
 | 
			
		||||
- [Segmentación semántica con SegFormer](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512)
 | 
			
		||||
- [Segmentación panóptica con DETR](https://huggingface.co/facebook/detr-resnet-50-panoptic)
 | 
			
		||||
- [Segmentación Universal con OneFormer (Segmentación Semántica, de Instancia y Panóptica con un solo modelo)](https://huggingface.co/shi-labs/oneformer_ade20k_dinat_large)
 | 
			
		||||
 | 
			
		||||
En Audio:
 | 
			
		||||
- [Reconocimiento de voz automático con Wav2Vec2](https://huggingface.co/facebook/wav2vec2-base-960h)
 | 
			
		||||
@ -261,6 +264,8 @@ Número actual de puntos de control:  para un resumen de alto nivel de cada uno de ellas.):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis.
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (from VinAI Research) released with the paper [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen.
 | 
			
		||||
@ -270,14 +275,19 @@ Número actual de puntos de control: ** (from VinAI Research) released with the paper [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) by Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen.
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (from Google Research) released with the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) by Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting.
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (from OFA-Sys) released with the paper [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (from OpenAI) released with the paper [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever.
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (from University of Göttingen) released with the paper [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke and Alexander Ecker.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (from Salesforce) released with the paper [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong.
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (from Microsoft Research Asia) released with the paper [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang.
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
 | 
			
		||||
@ -293,37 +303,44 @@ Número actual de puntos de control: ** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (from HuggingFace), released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) and a German version of DistilBERT.
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (from Microsoft Research) released with the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (from NAVER), released together with the paper [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) by Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (from Facebook) released with the paper [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (from Intel Labs) released with the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (from Baidu) released with the paper [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu.
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (from OpenAI) released with the paper [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever.
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (from EleutherAI) released in the repository [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) by Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy.
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (from EleutherAI) released with the paper [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745) by Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbach
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (from ABEJA) released by Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (from OpenAI) released with the paper [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) by Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever**.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki. 
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren. 
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (from UCSD, NVIDIA) released with the paper [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (from Facebook) released with the paper [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed.
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (from Berkeley) released with the paper [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) by Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer.
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (from Microsoft Research Asia) released with the paper [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (from Microsoft Research Asia) released with the paper [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) by Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (from Meta AI) released with the paper [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/main/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (from Google AI) released with the paper [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang.
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (from Studio Ousia) released with the paper [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) by Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto.
 | 
			
		||||
@ -332,6 +349,7 @@ Número actual de puntos de control: ** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (from Microsoft Research Asia) released with the paper [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei.
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (from FAIR and UIUC) released with the paper [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov.
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
@ -339,13 +357,17 @@ Número actual de puntos de control: ** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (from Studio Ousia) released with the paper [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka.
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (from CMU/Google Brain) released with the paper [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou.
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (from Google Inc.) released with the paper [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam.
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (from Google Inc.) released with the paper [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (from Apple) released with the paper [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari.
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (from Google AI) released with the paper [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel.
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (from SHI Labs) released with the paper [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (from SHI Labs) released with the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi.
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
@ -363,6 +385,8 @@ Número actual de puntos de control: ** (from Google Research) released with the paper [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/abs/2010.12821) by Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder.
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (from Facebook), released together with the paper [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov.
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (from Facebook) released with the paper [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (from WeChatAI) released with the paper [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) by HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (from ZhuiyiTechnology), released together with the paper [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/abs/2104.09864) by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu.
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
@ -373,22 +397,28 @@ Número actual de puntos de control: ** (from Berkeley) released with the paper [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer.
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (from Microsoft) released with the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) by Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo.
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (from Microsoft) released with the paper [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (from University of Würzburg) released with the paper [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) by Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte.
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer.
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (from Google AI) released with the paper [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (from Google AI) released in the repository [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (from Microsoft Research) released with the paper [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) by Brandon Smock, Rohith Pesala, Robin Abraham.
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (from Google AI) released with the paper [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) by Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos.
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (from Microsoft Research) released with the paper [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) by Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou.
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)**  (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (from Google/CMU) released with the paper [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov.
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (from Microsoft), released together with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (from Microsoft Research) released with the paper [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang.
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (from Microsoft Research) released with the paper [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu.
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (from Peking University) released with the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (from Tsinghua University and Nankai University) released with the paper [Visual Attention Network](https://arxiv.org/abs/2202.09741) by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu.
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (from Multimedia Computing Group, Nanjing University) released with the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (from NAVER AI Lab/Kakao Enterprise/Kakao Brain) released with the paper [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) by Wonjae Kim, Bokyung Son, Ildoo Kim.
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (from UCLA NLP) released with the paper [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) by Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang.
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (from Meta AI) released with the paper [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick.
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (from Meta AI) released with the paper [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (from Facebook AI) released with the paper [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										446
									
								
								README_hd.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										446
									
								
								README_hd.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,446 @@
 | 
			
		||||
<!---
 | 
			
		||||
Copyright 2020 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
you may not use this file except in compliance with the License.
 | 
			
		||||
You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
    http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<!---
 | 
			
		||||
A useful guide for English-Hindi translation of Hugging Face documentation
 | 
			
		||||
- Add space around English words and numbers when they appear between Hindi characters. E.g., कुल मिलाकर 100 से अधिक भाषाएँ; ट्रांसफॉर्मर लाइब्रेरी का उपयोग करता है।
 | 
			
		||||
- वर्गाकार उद्धरणों का प्रयोग करें, जैसे, "उद्धरण"
 | 
			
		||||
 | 
			
		||||
Dictionary
 | 
			
		||||
 | 
			
		||||
Hugging Face: गले लगाओ चेहरा
 | 
			
		||||
token: शब्द (और मूल अंग्रेजी को कोष्ठक में चिह्नित करें)
 | 
			
		||||
tokenize: टोकननाइज़ करें (और मूल अंग्रेज़ी को चिह्नित करने के लिए कोष्ठक का उपयोग करें)
 | 
			
		||||
tokenizer: Tokenizer (मूल अंग्रेजी में कोष्ठक के साथ)
 | 
			
		||||
transformer: transformer
 | 
			
		||||
pipeline: समनुक्रम
 | 
			
		||||
API: API (अनुवाद के बिना)
 | 
			
		||||
inference: विचार
 | 
			
		||||
Trainer: प्रशिक्षक। कक्षा के नाम के रूप में प्रस्तुत किए जाने पर अनुवादित नहीं किया गया।
 | 
			
		||||
pretrained/pretrain: पूर्व प्रशिक्षण
 | 
			
		||||
finetune: फ़ाइन ट्यूनिंग
 | 
			
		||||
community: समुदाय
 | 
			
		||||
example: जब विशिष्ट गोदाम example कैटलॉग करते समय "केस केस" के रूप में अनुवादित
 | 
			
		||||
Python data structures (e.g., list, set, dict): मूल अंग्रेजी को चिह्नित करने के लिए सूचियों, सेटों, शब्दकोशों में अनुवाद करें और कोष्ठक का उपयोग करें
 | 
			
		||||
NLP/Natural Language Processing: द्वारा NLP अनुवाद के बिना प्रकट होते हैं Natural Language Processing प्रस्तुत किए जाने पर प्राकृतिक भाषा संसाधन में अनुवाद करें
 | 
			
		||||
checkpoint: जाँच बिंदु
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<p align="center">
 | 
			
		||||
    <br>
 | 
			
		||||
    <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers_logo_name.png" width="400"/>
 | 
			
		||||
    <br>
 | 
			
		||||
<p>
 | 
			
		||||
<p align="center">
 | 
			
		||||
    <a href="https://circleci.com/gh/huggingface/transformers">
 | 
			
		||||
        <img alt="Build" src="https://img.shields.io/circleci/build/github/huggingface/transformers/main">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/blob/main/LICENSE">
 | 
			
		||||
        <img alt="GitHub" src="https://img.shields.io/github/license/huggingface/transformers.svg?color=blue">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://huggingface.co/docs/transformers/index">
 | 
			
		||||
        <img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/transformers/index.svg?down_color=red&down_message=offline&up_message=online">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/releases">
 | 
			
		||||
        <img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/transformers.svg">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md">
 | 
			
		||||
        <img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://zenodo.org/badge/latestdoi/155220641"><img src="https://zenodo.org/badge/155220641.svg" alt="DOI"></a>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<h4 align="center">
 | 
			
		||||
    <p>
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/">English</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <b>हिन्दी</b> |
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <p>Jax, PyTorch और TensorFlow के लिए उन्नत मशीन लर्निंग</p>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <a href="https://hf.co/course"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/course_banner.png"></a>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
🤗 Transformers 100 से अधिक भाषाओं में पाठ वर्गीकरण, सूचना निष्कर्षण, प्रश्न उत्तर, सारांशीकरण, अनुवाद, पाठ निर्माण का समर्थन करने के लिए हजारों पूर्व-प्रशिक्षित मॉडल प्रदान करता है। इसका उद्देश्य सबसे उन्नत एनएलपी तकनीक को सभी के लिए सुलभ बनाना है।
 | 
			
		||||
 | 
			
		||||
🤗 Transformers त्वरित डाउनलोड और उपयोग के लिए एक एपीआई प्रदान करता है, जिससे आप किसी दिए गए पाठ पर एक पूर्व-प्रशिक्षित मॉडल ले सकते हैं, इसे अपने डेटासेट पर ठीक कर सकते हैं और इसे [मॉडल हब] (https://huggingface.co/models) के माध्यम से समुदाय के साथ साझा कर सकते हैं। ) . इसी समय, प्रत्येक परिभाषित पायथन मॉड्यूल पूरी तरह से स्वतंत्र है, जो संशोधन और तेजी से अनुसंधान प्रयोगों के लिए सुविधाजनक है।
 | 
			
		||||
 | 
			
		||||
🤗 Transformers तीन सबसे लोकप्रिय गहन शिक्षण पुस्तकालयों का समर्थन करता है: [Jax](https://jax.readthedocs.io/en/latest/), [PyTorch](https://pytorch.org/) and [TensorFlow](https://www.tensorflow.org/) — और इसके साथ निर्बाध रूप से एकीकृत होता है। आप अपने मॉडल को सीधे एक ढांचे के साथ प्रशिक्षित कर सकते हैं और दूसरे के साथ लोड और अनुमान लगा सकते हैं।
 | 
			
		||||
 | 
			
		||||
## ऑनलाइन डेमो
 | 
			
		||||
 | 
			
		||||
आप सबसे सीधे मॉडल पृष्ठ पर परीक्षण कर सकते हैं [model hub](https://huggingface.co/models) मॉडल पर। हम [निजी मॉडल होस्टिंग, मॉडल संस्करण, और अनुमान एपीआई] भी प्रदान करते हैं।(https://huggingface.co/pricing)。
 | 
			
		||||
 | 
			
		||||
यहाँ कुछ उदाहरण हैं:
 | 
			
		||||
- [शब्द को भरने के लिए मास्क के रूप में BERT का प्रयोग करें](https://huggingface.co/bert-base-uncased?text=Paris+is+the+%5BMASK%5D+of+France)
 | 
			
		||||
- [इलेक्ट्रा के साथ नामित इकाई पहचान](https://huggingface.co/dbmdz/electra-large-discriminator-finetuned-conll03-english?text=My+name+is+Sarah+and+I+live+in+London+city)
 | 
			
		||||
- [जीपीटी-2 के साथ टेक्स्ट जनरेशन](https://huggingface.co/gpt2?text=A+long+time+ago%2C+)
 | 
			
		||||
- [रॉबर्टा के साथ प्राकृतिक भाषा निष्कर्ष](https://huggingface.co/roberta-large-mnli?text=The+dog+was+lost.+Nobody+lost+any+animal)
 | 
			
		||||
- [बार्ट के साथ पाठ सारांश](https://huggingface.co/facebook/bart-large-cnn?text=The+tower+is+324+metres+%281%2C063+ft%29+tall%2C+about+the+same+height+as+an+81-storey+building%2C+and+the+tallest+structure+in+Paris.+Its+base+is+square%2C+measuring+125+metres+%28410+ft%29+on+each+side.+During+its+construction%2C+the+Eiffel+Tower+surpassed+the+Washington+Monument+to+become+the+tallest+man-made+structure+in+the+world%2C+a+title+it+held+for+41+years+until+the+Chrysler+Building+in+New+York+City+was+finished+in+1930.+It+was+the+first+structure+to+reach+a+height+of+300+metres.+Due+to+the+addition+of+a+broadcasting+aerial+at+the+top+of+the+tower+in+1957%2C+it+is+now+taller+than+the+Chrysler+Building+by+5.2+metres+%2817+ft%29.+Excluding+transmitters%2C+the+Eiffel+Tower+is+the+second+tallest+free-standing+structure+in+France+after+the+Millau+Viaduct)
 | 
			
		||||
- [डिस्टिलबर्ट के साथ प्रश्नोत्तर](https://huggingface.co/distilbert-base-uncased-distilled-squad?text=Which+name+is+also+used+to+describe+the+Amazon+rainforest+in+English%3F&context=The+Amazon+rainforest+%28Portuguese%3A+Floresta+Amaz%C3%B4nica+or+Amaz%C3%B4nia%3B+Spanish%3A+Selva+Amaz%C3%B3nica%2C+Amazon%C3%ADa+or+usually+Amazonia%3B+French%3A+For%C3%AAt+amazonienne%3B+Dutch%3A+Amazoneregenwoud%29%2C+also+known+in+English+as+Amazonia+or+the+Amazon+Jungle%2C+is+a+moist+broadleaf+forest+that+covers+most+of+the+Amazon+basin+of+South+America.+This+basin+encompasses+7%2C000%2C000+square+kilometres+%282%2C700%2C000+sq+mi%29%2C+of+which+5%2C500%2C000+square+kilometres+%282%2C100%2C000+sq+mi%29+are+covered+by+the+rainforest.+This+region+includes+territory+belonging+to+nine+nations.+The+majority+of+the+forest+is+contained+within+Brazil%2C+with+60%25+of+the+rainforest%2C+followed+by+Peru+with+13%25%2C+Colombia+with+10%25%2C+and+with+minor+amounts+in+Venezuela%2C+Ecuador%2C+Bolivia%2C+Guyana%2C+Suriname+and+French+Guiana.+States+or+departments+in+four+nations+contain+%22Amazonas%22+in+their+names.+The+Amazon+represents+over+half+of+the+planet%27s+remaining+rainforests%2C+and+comprises+the+largest+and+most+biodiverse+tract+of+tropical+rainforest+in+the+world%2C+with+an+estimated+390+billion+individual+trees+divided+into+16%2C000+species)
 | 
			
		||||
- [अनुवाद के लिए T5 का प्रयोग करें](https://huggingface.co/t5-base?text=My+name+is+Wolfgang+and+I+live+in+Berlin)
 | 
			
		||||
 | 
			
		||||
**[Write With Transformer](https://transformer.huggingface.co)**,हगिंग फेस टीम द्वारा बनाया गया, यह एक आधिकारिक पाठ पीढ़ी है demo。
 | 
			
		||||
 | 
			
		||||
## यदि आप हगिंग फेस टीम से बीस्पोक समर्थन की तलाश कर रहे हैं
 | 
			
		||||
 | 
			
		||||
<a target="_blank" href="https://huggingface.co/support">
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://huggingface.co/front/thumbnails/support.png" style="max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a><br>
 | 
			
		||||
 | 
			
		||||
## जल्दी शुरू करें
 | 
			
		||||
 | 
			
		||||
हम त्वरित उपयोग के लिए मॉडल प्रदान करते हैं `pipeline` (पाइपलाइन) एपीआई। पाइपलाइन पूर्व-प्रशिक्षित मॉडल और संबंधित पाठ प्रीप्रोसेसिंग को एकत्रित करती है। सकारात्मक और नकारात्मक भावना को निर्धारित करने के लिए पाइपलाइनों का उपयोग करने का एक त्वरित उदाहरण यहां दिया गया है:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import pipeline
 | 
			
		||||
 | 
			
		||||
# भावना विश्लेषण पाइपलाइन का उपयोग करना
 | 
			
		||||
>>> classifier = pipeline('sentiment-analysis')
 | 
			
		||||
>>> classifier('We are very happy to introduce pipeline to the transformers repository.')
 | 
			
		||||
[{'label': 'POSITIVE', 'score': 0.9996980428695679}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
कोड की दूसरी पंक्ति पाइपलाइन द्वारा उपयोग किए गए पूर्व-प्रशिक्षित मॉडल को डाउनलोड और कैश करती है, जबकि कोड की तीसरी पंक्ति दिए गए पाठ पर मूल्यांकन करती है। यहां उत्तर 99 आत्मविश्वास के स्तर के साथ "सकारात्मक" है।
 | 
			
		||||
 | 
			
		||||
कई एनएलपी कार्यों में आउट ऑफ़ द बॉक्स पाइपलाइनों का पूर्व-प्रशिक्षण होता है। उदाहरण के लिए, हम किसी दिए गए पाठ से किसी प्रश्न का उत्तर आसानी से निकाल सकते हैं:
 | 
			
		||||
 | 
			
		||||
``` python
 | 
			
		||||
>>> from transformers import pipeline
 | 
			
		||||
 | 
			
		||||
# प्रश्नोत्तर पाइपलाइन का उपयोग करना
 | 
			
		||||
>>> question_answerer = pipeline('question-answering')
 | 
			
		||||
>>> question_answerer({
 | 
			
		||||
...     'question': 'What is the name of the repository ?',
 | 
			
		||||
...     'context': 'Pipeline has been included in the huggingface/transformers repository'
 | 
			
		||||
... })
 | 
			
		||||
{'score': 0.30970096588134766, 'start': 34, 'end': 58, 'answer': 'huggingface/transformers'}
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
उत्तर देने के अलावा, पूर्व-प्रशिक्षित मॉडल संगत आत्मविश्वास स्कोर भी देता है, जहां उत्तर टोकनयुक्त पाठ में शुरू और समाप्त होता है। आप [इस ट्यूटोरियल](https://huggingface.co/docs/transformers/task_summary) से पाइपलाइन एपीआई द्वारा समर्थित कार्यों के बारे में अधिक जान सकते हैं।
 | 
			
		||||
 | 
			
		||||
अपने कार्य पर किसी भी पूर्व-प्रशिक्षित मॉडल को डाउनलोड करना और उसका उपयोग करना भी कोड की तीन पंक्तियों की तरह सरल है। यहाँ PyTorch संस्करण के लिए एक उदाहरण दिया गया है:
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModel
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
 | 
			
		||||
>>> model = AutoModel.from_pretrained("bert-base-uncased")
 | 
			
		||||
 | 
			
		||||
>>> inputs = tokenizer("Hello world!", return_tensors="pt")
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
```
 | 
			
		||||
यहाँ समकक्ष है TensorFlow कोड:
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, TFAutoModel
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
 | 
			
		||||
>>> model = TFAutoModel.from_pretrained("bert-base-uncased")
 | 
			
		||||
 | 
			
		||||
>>> inputs = tokenizer("Hello world!", return_tensors="tf")
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
टोकननाइज़र सभी पूर्व-प्रशिक्षित मॉडलों के लिए प्रीप्रोसेसिंग प्रदान करता है और इसे सीधे एक स्ट्रिंग (जैसे ऊपर दिए गए उदाहरण) या किसी सूची पर बुलाया जा सकता है। यह एक डिक्शनरी (तानाशाही) को आउटपुट करता है जिसे आप डाउनस्ट्रीम कोड में उपयोग कर सकते हैं या `**` अनपैकिंग एक्सप्रेशन के माध्यम से सीधे मॉडल को पास कर सकते हैं।
 | 
			
		||||
 | 
			
		||||
मॉडल स्वयं एक नियमित [Pytorch `nn.Module`](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) या [TensorFlow `tf.keras.Model`](https ://pytorch.org/docs/stable/nn.html#torch.nn.Module) ://www.tensorflow.org/api_docs/python/tf/keras/Model) (आपके बैकएंड के आधार पर), जो हो सकता है सामान्य तरीके से उपयोग किया जाता है। [यह ट्यूटोरियल](https://huggingface.co/transformers/training.html) बताता है कि इस तरह के मॉडल को क्लासिक PyTorch या TensorFlow प्रशिक्षण लूप में कैसे एकीकृत किया जाए, या हमारे `ट्रेनर` एपीआई का उपयोग कैसे करें ताकि इसे जल्दी से फ़ाइन ट्यून किया जा सके।एक नया डेटासेट पे।
 | 
			
		||||
 | 
			
		||||
## ट्रांसफार्मर का उपयोग क्यों करें?
 | 
			
		||||
 | 
			
		||||
1. उपयोग में आसानी के लिए उन्नत मॉडल:
 | 
			
		||||
    - एनएलयू और एनएलजी पर बेहतर प्रदर्शन
 | 
			
		||||
    - प्रवेश के लिए कम बाधाओं के साथ शिक्षण और अभ्यास के अनुकूल
 | 
			
		||||
    - उपयोगकर्ता-सामना करने वाले सार तत्व, केवल तीन वर्गों को जानने की जरूरत है
 | 
			
		||||
    - सभी मॉडलों के लिए एकीकृत एपीआई
 | 
			
		||||
 | 
			
		||||
1. कम कम्प्यूटेशनल ओवरहेड और कम कार्बन उत्सर्जन:
 | 
			
		||||
    - शोधकर्ता हर बार नए सिरे से प्रशिक्षण देने के बजाय प्रशिक्षित मॉडल साझा कर सकते हैं
 | 
			
		||||
    - इंजीनियर गणना समय और उत्पादन ओवरहेड को कम कर सकते हैं
 | 
			
		||||
    - दर्जनों मॉडल आर्किटेक्चर, 2,000 से अधिक पूर्व-प्रशिक्षित मॉडल, 100 से अधिक भाषाओं का समर्थन
 | 
			
		||||
 | 
			
		||||
1.मॉडल जीवनचक्र के हर हिस्से को शामिल करता है:
 | 
			
		||||
    - कोड की केवल 3 पंक्तियों में उन्नत मॉडलों को प्रशिक्षित करें
 | 
			
		||||
    - मॉडल को मनमाने ढंग से विभिन्न डीप लर्निंग फ्रेमवर्क के बीच स्थानांतरित किया जा सकता है, जैसा आप चाहते हैं
 | 
			
		||||
    - निर्बाध रूप से प्रशिक्षण, मूल्यांकन और उत्पादन के लिए सबसे उपयुक्त ढांचा चुनें
 | 
			
		||||
 | 
			
		||||
1. आसानी से अनन्य मॉडल को अनुकूलित करें और अपनी आवश्यकताओं के लिए मामलों का उपयोग करें:
 | 
			
		||||
    - हम मूल पेपर परिणामों को पुन: पेश करने के लिए प्रत्येक मॉडल आर्किटेक्चर के लिए कई उपयोग के मामले प्रदान करते हैं
 | 
			
		||||
    - मॉडल की आंतरिक संरचना पारदर्शी और सुसंगत रहती है
 | 
			
		||||
    - मॉडल फ़ाइल को अलग से इस्तेमाल किया जा सकता है, जो संशोधन और त्वरित प्रयोग के लिए सुविधाजनक है
 | 
			
		||||
 | 
			
		||||
## मुझे ट्रांसफॉर्मर का उपयोग कब नहीं करना चाहिए?
 | 
			
		||||
 | 
			
		||||
- यह लाइब्रेरी मॉड्यूलर न्यूरल नेटवर्क टूलबॉक्स नहीं है। मॉडल फ़ाइल में कोड जानबूझकर अल्पविकसित है, बिना अतिरिक्त सार इनकैप्सुलेशन के, ताकि शोधकर्ता अमूर्तता और फ़ाइल जंपिंग में शामिल हुए जल्दी से पुनरावृति कर सकें।
 | 
			
		||||
- `ट्रेनर` एपीआई किसी भी मॉडल के साथ संगत नहीं है, यह केवल इस पुस्तकालय के मॉडल के लिए अनुकूलित है। यदि आप सामान्य मशीन लर्निंग के लिए उपयुक्त प्रशिक्षण लूप कार्यान्वयन की तलाश में हैं, तो कहीं और देखें।
 | 
			
		||||
- हमारे सर्वोत्तम प्रयासों के बावजूद, [उदाहरण निर्देशिका] (https://github.com/huggingface/transformers/tree/main/examples) में स्क्रिप्ट केवल उपयोग के मामले हैं। आपकी विशिष्ट समस्या के लिए, वे जरूरी नहीं कि बॉक्स से बाहर काम करें, और आपको कोड की कुछ पंक्तियों को सूट करने की आवश्यकता हो सकती है।
 | 
			
		||||
 | 
			
		||||
## स्थापित करना
 | 
			
		||||
 | 
			
		||||
### पिप का उपयोग करना
 | 
			
		||||
 | 
			
		||||
इस रिपॉजिटरी का परीक्षण Python 3.6+, Flax 0.3.2+, PyTorch 1.3.1+ और TensorFlow 2.3+ के तहत किया गया है।
 | 
			
		||||
 | 
			
		||||
आप [वर्चुअल एनवायरनमेंट] (https://docs.python.org/3/library/venv.html) में 🤗 ट्रांसफॉर्मर इंस्टॉल कर सकते हैं। यदि आप अभी तक पायथन के वर्चुअल एनवायरनमेंट से परिचित नहीं हैं, तो कृपया इसे [उपयोगकर्ता निर्देश] (https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) पढ़ें।
 | 
			
		||||
 | 
			
		||||
सबसे पहले, पायथन के उस संस्करण के साथ एक आभासी वातावरण बनाएं जिसका आप उपयोग करने और उसे सक्रिय करने की योजना बना रहे हैं।
 | 
			
		||||
 | 
			
		||||
फिर, आपको Flax, PyTorch या TensorFlow में से किसी एक को स्थापित करने की आवश्यकता है। अपने प्लेटफ़ॉर्म पर इन फ़्रेमवर्क को स्थापित करने के लिए, [TensorFlow स्थापना पृष्ठ](https://www.tensorflow.org/install/), [PyTorch स्थापना पृष्ठ](https://pytorch.org/get-started /locally/# देखें) start-locally) या [Flax स्थापना पृष्ठ](https://github.com/google/flax#quick-install).
 | 
			
		||||
 | 
			
		||||
जब इनमें से कोई एक बैकएंड सफलतापूर्वक स्थापित हो जाता है, तो ट्रांसफॉर्मर निम्नानुसार स्थापित किए जा सकते हैं:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
pip install transformers
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
यदि आप उपयोग के मामलों को आज़माना चाहते हैं या आधिकारिक रिलीज़ से पहले नवीनतम इन-डेवलपमेंट कोड का उपयोग करना चाहते हैं, तो आपको [सोर्स से इंस्टॉल करना होगा](https://huggingface.co/docs/transformers/installation#installing-from- स्रोत)।
 | 
			
		||||
 | 
			
		||||
### कोंडा का उपयोग करना
 | 
			
		||||
 | 
			
		||||
ट्रांसफॉर्मर संस्करण 4.0.0 के बाद से, हमारे पास एक कोंडा चैनल है: `हगिंगफेस`।
 | 
			
		||||
 | 
			
		||||
ट्रांसफॉर्मर कोंडा के माध्यम से निम्नानुसार स्थापित किया जा सकता है:
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
conda install -c huggingface transformers
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
कोंडा के माध्यम से Flax, PyTorch, या TensorFlow में से किसी एक को स्थापित करने के लिए, निर्देशों के लिए उनके संबंधित स्थापना पृष्ठ देखें।
 | 
			
		||||
 | 
			
		||||
## मॉडल आर्किटेक्चर
 | 
			
		||||
[उपयोगकर्ता](https://huggingface.co/users) और [organization](https://huggingface.co) द्वारा ट्रांसफॉर्मर समर्थित [**सभी मॉडल चौकियों**](https://huggingface.co/models) /users) हगिंगफेस.को/ऑर्गनाइजेशन), सभी को बिना किसी बाधा के हगिंगफेस.को [मॉडल हब](https://huggingface.co) के साथ एकीकृत किया गया है।
 | 
			
		||||
 | 
			
		||||
चौकियों की वर्तमान संख्या: 
 | 
			
		||||
 | 
			
		||||
🤗 ट्रांसफॉर्मर वर्तमान में निम्नलिखित आर्किटेक्चर का समर्थन करते हैं (मॉडल के अवलोकन के लिए [यहां] देखें (https://huggingface.co/docs/transformers/model_summary)):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (Google Research and the Toyota Technological Institute at Chicago) साथ थीसिस [ALBERT: A Lite BERT for Self-supervised भाषा प्रतिनिधित्व सीखना](https://arxiv.org/abs/1909.11942), झेंझोंग लैन, मिंगदा चेन, सेबेस्टियन गुडमैन, केविन गिम्पेल, पीयूष शर्मा, राडू सोरिकट
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (फेसबुक) साथ थीसिस [बार्ट: प्राकृतिक भाषा निर्माण, अनुवाद के लिए अनुक्रम-से-अनुक्रम पूर्व प्रशिक्षण , और समझ] (https://arxiv.org/pdf/1910.13461.pdf) पर निर्भर माइक लुईस, यिनहान लियू, नमन गोयल, मार्जन ग़ज़विनिनेजाद, अब्देलरहमान मोहम्मद, ओमर लेवी, वेस स्टोयानोव और ल्यूक ज़ेटलमॉयर
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (से École polytechnique) साथ थीसिस [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) पर निर्भर Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis रिहाई।
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (VinAI Research से) साथ में पेपर [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701)गुयेन लुओंग ट्रान, डुओंग मिन्ह ले और डाट क्वोक गुयेन द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[BEiT](https://huggingface.co/docs/transformers/model_doc/beit)** (Microsoft से) साथ में कागज [BEiT: BERT इमेज ट्रांसफॉर्मर्स का प्री-ट्रेनिंग](https://arxiv.org/abs/2106.08254) Hangbo Bao, Li Dong, Furu Wei द्वारा।
 | 
			
		||||
1. **[BERT](https://huggingface.co/docs/transformers/model_doc/bert)** (गूगल से) साथ वाला पेपर [बीईआरटी: प्री-ट्रेनिंग ऑफ डीप बिडायरेक्शनल ट्रांसफॉर्मर्स फॉर लैंग्वेज अंडरस्टैंडिंग](https://arxiv.org/abs/1810.04805) जैकब डेवलिन, मिंग-वेई चांग, केंटन ली और क्रिस्टीना टौटानोवा द्वारा प्रकाशित किया गया था। .
 | 
			
		||||
1. **[BERT For Sequence Generation](https://huggingface.co/docs/transformers/model_doc/bert-generation)** (गूगल से) साथ देने वाला पेपर [सीक्वेंस जेनरेशन टास्क के लिए प्री-ट्रेंड चेकपॉइंट का इस्तेमाल करना](https ://arxiv.org/abs/1907.12461) साशा रोठे, शशि नारायण, अलियाक्सि सेवेरिन द्वारा।
 | 
			
		||||
1. **[BERTweet](https://huggingface.co/docs/transformers/model_doc/bertweet)** (VinAI Research से) साथ में पेपर [BERTweet: अंग्रेजी ट्वीट्स के लिए एक पूर्व-प्रशिक्षित भाषा मॉडल] (https://aclanthology.org/2020.emnlp-demos.2/) डाट क्वोक गुयेन, थान वु और अन्ह तुआन गुयेन द्वारा प्रकाशित।
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (गूगल रिसर्च से) साथ वाला पेपर [बिग बर्ड: ट्रांसफॉर्मर्स फॉर लॉन्गर सीक्वेंस](https://arxiv .org/abs/2007.14062) मंज़िल ज़हीर, गुरु गुरुगणेश, अविनावा दुबे, जोशुआ आइंस्ली, क्रिस अल्बर्टी, सैंटियागो ओंटानोन, फिलिप फाम, अनिरुद्ध रावुला, किफ़ान वांग, ली यांग, अमर अहमद द्वारा।
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (गूगल रिसर्च से) साथ में पेपर [बिग बर्ड: ट्रांसफॉर्मर्स फॉर लॉन्गर सीक्वेंस](https://arxiv.org/abs/2007.14062) मंज़िल ज़हीर, गुरु गुरुगणेश, अविनावा दुबे, जोशुआ आइंस्ली, क्रिस अल्बर्टी, सैंटियागो ओंटानन, फिलिप फाम द्वारा , अनिरुद्ध रावुला, किफ़ान वांग, ली यांग, अमर अहमद द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (फेसबुक से) साथ में कागज [एक ओपन-डोमेन चैटबॉट बनाने की विधि](https://arxiv.org /abs/2004.13637) स्टीफन रोलर, एमिली दीनन, नमन गोयल, दा जू, मैरी विलियमसन, यिनहान लियू, जिंग जू, मायल ओट, कर्ट शस्टर, एरिक एम। स्मिथ, वाई-लैन बॉरो, जेसन वेस्टन द्वारा।
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (फेसबुक से) साथ में पेपर [एक ओपन-डोमेन चैटबॉट बनाने की रेसिपी](https://arxiv .org/abs/2004.13637) स्टीफन रोलर, एमिली दीनन, नमन गोयल, दा जू, मैरी विलियमसन, यिनहान लियू, जिंग जू, मायल ओट, कर्ट शस्टर, एरिक एम स्मिथ, वाई-लैन बॉरो, जेसन वेस्टन द्वारा।
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (एलेक्सा से) कागज के साथ [बीईआरटी के लिए ऑप्टिमल सबआर्किटेक्चर एक्सट्रैक्शन](https://arxiv.org/abs/ 2010.10499) एड्रियन डी विंटर और डैनियल जे पेरी द्वारा।
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (Google अनुसंधान से) साथ में कागज [ByT5: पूर्व-प्रशिक्षित बाइट-टू-बाइट मॉडल के साथ एक टोकन-मुक्त भविष्य की ओर] (https://arxiv.org/abs/2105.13626) Linting Xue, Aditya Barua, Noah Constant, रामी अल-रफू, शरण नारंग, मिहिर काले, एडम रॉबर्ट्स, कॉलिन रैफेल द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (इनरिया/फेसबुक/सोरबोन से) साथ में कागज [CamemBERT: एक टेस्टी फ्रेंच लैंग्वेज मॉडल](https:// arxiv.org/abs/1911.03894) लुई मार्टिन*, बेंजामिन मुलर*, पेड्रो जेवियर ऑर्टिज़ सुआरेज़*, योआन ड्यूपॉन्ट, लॉरेंट रोमरी, एरिक विलेमोन्टे डे ला क्लर्जरी, जैमे सेडाह और बेनोइट सगोट द्वारा।
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (Google रिसर्च से) साथ में दिया गया पेपर [कैनाइन: प्री-ट्रेनिंग ए एफिशिएंट टोकनाइजेशन-फ्री एनकोडर फॉर लैंग्वेज रिप्रेजेंटेशन]( https://arxiv.org/abs/2103.06874) जोनाथन एच क्लार्क, डैन गैरेट, यूलिया टर्क, जॉन विएटिंग द्वारा।
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (from OFA-Sys) released with the paper [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (OpenAI से) साथ वाला पेपर [लर्निंग ट्रांसफरेबल विजुअल मॉडल फ्रॉम नेचुरल लैंग्वेज सुपरविजन](https://arxiv.org /abs/2103.00020) एलेक रैडफोर्ड, जोंग वूक किम, क्रिस हैलासी, आदित्य रमेश, गेब्रियल गोह, संध्या अग्रवाल, गिरीश शास्त्री, अमांडा एस्केल, पामेला मिश्किन, जैक क्लार्क, ग्रेचेन क्रुएगर, इल्या सुत्स्केवर द्वारा।
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (from University of Göttingen) released with the paper [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke and Alexander Ecker.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (सेल्सफोर्स से) साथ में पेपर [प्रोग्राम सिंथेसिस के लिए एक संवादात्मक प्रतिमान](https://arxiv.org/abs/2203.13474) एरिक निजकैंप, बो पैंग, हिरोआकी हयाशी, लिफू तू, हुआन वांग, यिंगबो झोउ, सिल्वियो सावरेस, कैमिंग जिओंग रिलीज।
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (माइक्रोसॉफ्ट रिसर्च एशिया से) कागज के साथ [फास्ट ट्रेनिंग कन्वर्जेंस के लिए सशर्त डीईटीआर](https://arxiv. org/abs/2108.06152) डेपू मेंग, ज़ियाओकांग चेन, ज़ेजिया फैन, गैंग ज़ेंग, होउकियांग ली, युहुई युआन, लेई सन, जिंगडोंग वांग द्वारा।
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (YituTech से) साथ में कागज [ConvBERT: स्पैन-आधारित डायनेमिक कनवल्शन के साथ BERT में सुधार](https://arxiv .org/abs/2008.02496) जिहांग जियांग, वीहाओ यू, डाकान झोउ, युनपेंग चेन, जियाशी फेंग, शुइचेंग यान द्वारा।
 | 
			
		||||
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (Facebook AI से) साथ वाला पेपर [A ConvNet for the 2020s](https://arxiv.org/abs /2201.03545) ज़ुआंग लियू, हेंज़ी माओ, चाओ-युआन वू, क्रिस्टोफ़ फीचटेनहोफ़र, ट्रेवर डेरेल, सैनिंग ज़ी द्वारा।
 | 
			
		||||
1. **[CPM](https://huggingface.co/docs/transformers/model_doc/cpm)** (सिंघुआ यूनिवर्सिटी से) साथ में पेपर [सीपीएम: ए लार्ज-स्केल जेनेरेटिव चाइनीज प्री-ट्रेंड लैंग्वेज मॉडल](https : //arxiv.org/abs/2012.00413) झेंग्यान झांग, जू हान, हाओ झोउ, पेई के, युक्सियन गु, डेमिंग ये, युजिया किन, युशेंग सु, हाओझे जी, जियान गुआन, फैंचाओ क्यूई, ज़ियाओझी वांग, यानान झेंग द्वारा , गुओयांग ज़ेंग, हुआनकी काओ, शेंगकी चेन, डाइक्सुआन ली, ज़ेनबो सन, ज़ियुआन लियू, मिनली हुआंग, वेंटाओ हान, जी तांग, जुआनज़ी ली, ज़ियाओयान झू, माओसोंग सन।
 | 
			
		||||
1. **[CTRL](https://huggingface.co/docs/transformers/model_doc/ctrl)** (सेल्सफोर्स से) साथ में पेपर [CTRL: ए कंडिशनल ट्रांसफॉर्मर लैंग्वेज मॉडल फॉर कंट्रोलेबल जेनरेशन](https://arxiv.org/abs/1909.05858) नीतीश शिरीष केसकर*, ब्रायन मैककैन*, लव आर. वार्ष्णेय, कैमिंग जिओंग और रिचर्ड द्वारा सोचर द्वारा जारी किया गया।
 | 
			
		||||
1. **[CvT](https://huggingface.co/docs/transformers/model_doc/cvt)** (Microsoft से) साथ में दिया गया पेपर [CvT: इंट्रोड्यूसिंग कनवॉल्यूशन टू विजन ट्रांसफॉर्मर्स](https://arxiv.org/ एब्स/2103.15808) हैपिंग वू, बिन जिओ, नोएल कोडेला, मेंगचेन लियू, जियांग दाई, लू युआन, लेई झांग द्वारा।
 | 
			
		||||
1. **[Data2Vec](https://huggingface.co/docs/transformers/model_doc/data2vec)** (फेसबुक से) साथ में कागज [Data2Vec: भाषण, दृष्टि और भाषा में स्व-पर्यवेक्षित सीखने के लिए एक सामान्य ढांचा] (https://arxiv.org/abs/2202.03555) एलेक्सी बाएव्स्की, वेई-निंग सू, कियानटोंग जू, अरुण बाबू, जियाताओ गु, माइकल औली द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (Microsoft से) साथ में दिया गया पेपर [DeBERta: डिकोडिंग-एन्हांस्ड BERT विद डिसेंटैंगल्ड अटेंशन](https://arxiv. org/abs/2006.03654) पेंगचेंग हे, ज़ियाओडोंग लियू, जियानफेंग गाओ, वीज़ू चेन द्वारा।
 | 
			
		||||
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (Microsoft से) साथ में दिया गया पेपर [DeBERTa: डिकोडिंग-एन्हांस्ड BERT विथ डिसेंन्गल्ड अटेंशन](https: //arxiv.org/abs/2006.03654) पेंगचेंग हे, ज़ियाओडोंग लियू, जियानफेंग गाओ, वीज़ू चेन द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Decision Transformer](https://huggingface.co/docs/transformers/model_doc/decision_transformer)** (बर्कले/फेसबुक/गूगल से) पेपर के साथ [डिसीजन ट्रांसफॉर्मर: रीनफोर्समेंट लर्निंग वाया सीक्वेंस मॉडलिंग](https : //arxiv.org/abs/2106.01345) लिली चेन, केविन लू, अरविंद राजेश्वरन, किमिन ली, आदित्य ग्रोवर, माइकल लास्किन, पीटर एबील, अरविंद श्रीनिवास, इगोर मोर्डच द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Deformable DETR](https://huggingface.co/docs/transformers/model_doc/deformable_detr)** (सेंसटाइम रिसर्च से) साथ में पेपर [डिफॉर्मेबल डीईटीआर: डिफॉर्मेबल ट्रांसफॉर्मर्स फॉर एंड-टू-एंड ऑब्जेक्ट डिटेक्शन] (https://arxiv.org/abs/2010.04159) Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, जिफेंग दाई द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (फेसबुक से) साथ में पेपर [ट्रेनिंग डेटा-एफिशिएंट इमेज ट्रांसफॉर्मर और डिस्टिलेशन थ्रू अटेंशन](https://arxiv .org/abs/2012.12877) ह्यूगो टौव्रोन, मैथ्यू कॉर्ड, मैथिज्स डूज़, फ़्रांसिस्को मस्सा, एलेक्ज़ेंडर सबलेरोल्स, हर्वे जेगौ द्वारा।
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (फेसबुक से) साथ में कागज [ट्रांसफॉर्मर्स के साथ एंड-टू-एंड ऑब्जेक्ट डिटेक्शन](https://arxiv. org/abs/2005.12872) निकोलस कैरियन, फ़्रांसिस्को मस्सा, गेब्रियल सिनेव, निकोलस उसुनियर, अलेक्जेंडर किरिलोव, सर्गेई ज़ागोरुयको द्वारा।
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (माइक्रोसॉफ्ट रिसर्च से) कागज के साथ [DialoGPT: बड़े पैमाने पर जनरेटिव प्री-ट्रेनिंग फॉर कन्वर्सेशनल रिस्पांस जेनरेशन](https ://arxiv.org/abs/1911.00536) यिज़े झांग, सिकी सन, मिशेल गैली, येन-चुन चेन, क्रिस ब्रोकेट, जियांग गाओ, जियानफेंग गाओ, जिंगजिंग लियू, बिल डोलन द्वारा।
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (हगिंगफेस से), साथ में कागज [डिस्टिलबर्ट, बीईआरटी का डिस्टिल्ड वर्जन: छोटा, तेज, सस्ता और हल्का] (https://arxiv.org/abs/1910.01108) विक्टर सनह, लिसांड्रे डेब्यू और थॉमस वुल्फ द्वारा पोस्ट किया गया। यही तरीका GPT-2 को [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERta से [DistilRoBERta](https://github.com) पर कंप्रेस करने के लिए भी लागू किया जाता है। / हगिंगफेस/ट्रांसफॉर्मर्स/ट्री/मेन/उदाहरण/डिस्टिलेशन), बहुभाषी BERT से [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) और डिस्टिलबर्ट का जर्मन संस्करण।
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (माइक्रोसॉफ्ट रिसर्च से) साथ में पेपर [DiT: सेल्फ सुपरवाइज्ड प्री-ट्रेनिंग फॉर डॉक्यूमेंट इमेज ट्रांसफॉर्मर](https://arxiv.org/abs/2203.02378) जुनलॉन्ग ली, यिहेंग जू, टेंगचाओ लव, लेई कुई, चा झांग द्वारा फुरु वेई द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (NAVER से) साथ में कागज [OCR-मुक्त डॉक्यूमेंट अंडरस्टैंडिंग ट्रांसफॉर्मर](https://arxiv.org/abs /2111.15664) गीवूक किम, टीकग्यू होंग, मूनबिन यिम, जियोंग्योन नाम, जिनयॉन्ग पार्क, जिनयॉन्ग यिम, वोनसेओक ह्वांग, सांगडू यूं, डोंगयून हान, सेउंग्युन पार्क द्वारा।
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (फेसबुक से) साथ में पेपर [ओपन-डोमेन क्वेश्चन आंसरिंग के लिए डेंस पैसेज रिट्रीवल](https://arxiv. org/abs/2004.04906) व्लादिमीर करपुखिन, बरलास ओज़ुज़, सेवन मिन, पैट्रिक लुईस, लेडेल वू, सर्गेई एडुनोव, डैनकी चेन, और वेन-ताऊ यिह द्वारा।
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (इंटेल लैब्स से) साथ में कागज [विज़न ट्रांसफॉर्मर्स फॉर डेंस प्रेडिक्शन](https://arxiv.org /abs/2103.13413) रेने रैनफ्टल, एलेक्सी बोचकोवस्की, व्लादलेन कोल्टन द्वारा।
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (Google रिसर्च/स्टैनफोर्ड यूनिवर्सिटी से) साथ में दिया गया पेपर [इलेक्ट्रा: जेनरेटर के बजाय भेदभाव करने वाले के रूप में टेक्स्ट एन्कोडर्स का पूर्व-प्रशिक्षण] (https://arxiv.org/abs/2003.10555) केविन क्लार्क, मिन्ह-थांग लुओंग, क्वोक वी. ले, क्रिस्टोफर डी. मैनिंग द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (Google रिसर्च से) साथ में दिया गया पेपर [सीक्वेंस जेनरेशन टास्क के लिए प्री-ट्रेंड चेकपॉइंट का इस्तेमाल करना](https:/ /arxiv.org/abs/1907.12461) साशा रोठे, शशि नारायण, अलियाक्सि सेवेरिन द्वारा।
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)**(Baidu से) साथ देने वाला पेपर [ERNIE: एन्हांस्ड रिप्रेजेंटेशन थ्रू नॉलेज इंटीग्रेशन](https://arxiv.org/abs/1904.09223) यू सन, शुओहुआन वांग, युकुन ली, शिकुन फेंग, ज़ुई चेन, हान झांग, शिन तियान, डैनक्सियांग झू, हाओ तियान, हुआ वू द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (मेटा AI से) ट्रांसफॉर्मर प्रोटीन भाषा मॉडल हैं। **ESM-1b** पेपर के साथ जारी किया गया था [ अलेक्जेंडर राइव्स, जोशुआ मेयर, टॉम सर्कु, सिद्धार्थ गोयल, ज़ेमिंग लिन द्वारा जैविक संरचना और कार्य असुरक्षित सीखने को 250 मिलियन प्रोटीन अनुक्रमों तक स्केल करने से उभरता है] (https://www.pnas.org/content/118/15/e2016239118) जेसन लियू, डेमी गुओ, मायल ओट, सी. लॉरेंस ज़िटनिक, जेरी मा और रॉब फर्गस। **ESM-1v** को पेपर के साथ जारी किया गया था [भाषा मॉडल प्रोटीन फ़ंक्शन पर उत्परिवर्तन के प्रभावों की शून्य-शॉट भविष्यवाणी को सक्षम करते हैं] (https://doi.org/10.1101/2021.07.09.450648) जोशुआ मेयर, रोशन राव, रॉबर्ट वेरकुइल, जेसन लियू, टॉम सर्कु और अलेक्जेंडर राइव्स द्वारा। **ESM-2** को पेपर के साथ जारी किया गया था [भाषा मॉडल विकास के पैमाने पर प्रोटीन अनुक्रम सटीक संरचना भविष्यवाणी को सक्षम करते हैं](https://doi.org/10.1101/2022.07.20.500902) ज़ेमिंग लिन, हलील अकिन, रोशन राव, ब्रायन ही, झोंगकाई झू, वेंटिंग लू, ए द्वारा लान डॉस सैंटोस कोस्टा, मरियम फ़ज़ल-ज़रंडी, टॉम सर्कू, साल कैंडिडो, अलेक्जेंडर राइव्स।
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei 
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (CNRS से) साथ वाला पेपर [FlauBERT: Unsupervised Language Model Pre-training for फ़्रेंच](https://arxiv .org/abs/1912.05372) Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, बेंजामिन लेकोउटेक्स, अलेक्जेंड्रे अल्लाउज़ेन, बेनोइट क्रैबे, लॉरेंट बेसेसियर, डिडिएर श्वाब द्वारा।
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (FLAVA: A फाउंडेशनल लैंग्वेज एंड विजन अलाइनमेंट मॉडल) (https://arxiv) साथ वाला पेपर .org/abs/2112.04482) अमनप्रीत सिंह, रोंगहांग हू, वेदानुज गोस्वामी, गुइल्यूम कुएरॉन, वोज्शिएक गालुबा, मार्कस रोहरबैक, और डौवे कीला द्वारा।
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (गूगल रिसर्च से) साथ वाला पेपर [FNet: मिक्सिंग टोकन विद फूरियर ट्रांसफॉर्म्स](https://arxiv.org /abs/2105.03824) जेम्स ली-थॉर्प, जोशुआ आइंस्ली, इल्या एकस्टीन, सैंटियागो ओंटानन द्वारा।
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (सीएमयू/गूगल ब्रेन से) साथ में कागज [फ़नल-ट्रांसफॉर्मर: कुशल भाषा प्रसंस्करण के लिए अनुक्रमिक अतिरेक को छानना](https://arxiv.org/abs/2006.03236) जिहांग दाई, गुओकुन लाई, यिमिंग यांग, क्वोक वी. ले द्वारा रिहाई।
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (KAIST से) साथ वाला पेपर [वर्टिकल कटडेप्थ के साथ मोनोकुलर डेप्थ एस्टीमेशन के लिए ग्लोबल-लोकल पाथ नेटवर्क्स](https:/ /arxiv.org/abs/2201.07436) डोयोन किम, वूंगह्युन गा, प्युंगवान आह, डोंगग्यू जू, सेहवान चुन, जुनमो किम द्वारा।
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (OpenAI से) साथ में दिया गया पेपर [जेनरेटिव प्री-ट्रेनिंग द्वारा भाषा की समझ में सुधार](https://blog .openai.com/language-unsupervised/) एलेक रैडफोर्ड, कार्तिक नरसिम्हन, टिम सालिमन्स और इल्या सुत्स्केवर द्वारा।
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (EleutherAI से) रिपॉजिटरी के साथ [EleutherAI/gpt-neo](https://github.com/ EleutherAI /gpt-neo) रिलीज। सिड ब्लैक, स्टेला बिडरमैन, लियो गाओ, फिल वांग और कॉनर लेही द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (EleutherAI से) पेपर के साथ जारी किया गया [GPT-NeoX-20B: एक ओपन-सोर्स ऑटोरेग्रेसिव लैंग्वेज मॉडल] (https://arxiv.org/abs/2204.06745) सिड ब्लैक, स्टेला बिडरमैन, एरिक हैलाहन, क्वेंटिन एंथोनी, लियो गाओ, लॉरेंस गोल्डिंग, होरेस हे, कॉनर लेही, काइल मैकडोनेल, जेसन फांग, माइकल पाइलर, यूएसवीएसएन साई प्रशांत द्वारा , शिवांशु पुरोहित, लारिया रेनॉल्ड्स, जोनाथन टो, बेन वांग, सैमुअल वेनबैक
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (अबेजा के जरिए) शिन्या ओटानी, ताकायोशी मकाबे, अनुज अरोड़ा, क्यो हटोरी द्वारा।
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (ओपनएआई से) साथ में पेपर [लैंग्वेज मॉडल्स अनसुपरवाइज्ड मल्टीटास्क लर्नर्स हैं](https://blog.openai.com/better-language-models/) एलेक रैडफोर्ड*, जेफरी वू*, रेवन चाइल्ड, डेविड लुआन, डारियो एमोडी* द्वारा * और इल्या सुत्सकेवर** ने पोस्ट किया।
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (EleutherAI से) साथ वाला पेपर [kingoflolz/mesh-transformer-jax](https://github. com/kingoflolz/mesh-transformer-jax/) बेन वांग और अरन कोमात्सुजाकी द्वारा।
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren.
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (UCSD, NVIDIA से) साथ में कागज [GroupViT: टेक्स्ट सुपरविजन से सिमेंटिक सेगमेंटेशन इमर्जेस](https://arxiv .org/abs/2202.11094) जियारुई जू, शालिनी डी मेलो, सिफ़ी लियू, वोनमिन बायन, थॉमस ब्रेउएल, जान कौट्ज़, ज़ियाओलोंग वांग द्वारा।
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (फेसबुक से) साथ में पेपर [ह्यूबर्ट: सेल्फ सुपरवाइज्ड स्पीच रिप्रेजेंटेशन लर्निंग बाय मास्क्ड प्रेडिक्शन ऑफ हिडन यूनिट्स](https ://arxiv.org/abs/2106.07447) वेई-निंग सू, बेंजामिन बोल्टे, याओ-हंग ह्यूबर्ट त्साई, कुशाल लखोटिया, रुस्लान सालाखुतदीनोव, अब्देलरहमान मोहम्मद द्वारा।
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (बर्कले से) साथ में कागज [I-BERT: Integer-only BERT Quantization](https:// arxiv.org/abs/2101.01321) सेहून किम, अमीर घोलमी, ज़ेवेई याओ, माइकल डब्ल्यू महोनी, कर्ट केटज़र द्वारा।
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (माइक्रोसॉफ्ट रिसर्च एशिया से) साथ देने वाला पेपर [लेआउटएलएमवी3: यूनिफाइड टेक्स्ट और इमेज मास्किंग के साथ दस्तावेज़ एआई के लिए पूर्व-प्रशिक्षण](https://arxiv.org/abs/2204.08387) युपन हुआंग, टेंगचाओ लव, लेई कुई, युटोंग लू, फुरु वेई द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (from Microsoft Research Asia) released with the paper [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) by Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (मेटा AI से) साथ वाला पेपर [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https:/ /arxiv.org/abs/2104.01136) बेन ग्राहम, अलाएल्डिन एल-नौबी, ह्यूगो टौवरन, पियरे स्टॉक, आर्मंड जौलिन, हर्वे जेगौ, मैथिज डूज़ द्वारा।
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (दक्षिण चीन प्रौद्योगिकी विश्वविद्यालय से) साथ में कागज [LiLT: एक सरल लेकिन प्रभावी भाषा-स्वतंत्र लेआउट ट्रांसफार्मर संरचित दस्तावेज़ समझ के लिए](https://arxiv.org/abs/2202.13669) जियापेंग वांग, लियानवेन जिन, काई डिंग द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (मैंडी गुओ, जोशुआ आइंस्ली, डेविड यूथस, सैंटियागो ओंटानन, जियानमो नि, यूं-हुआन सुंग, यिनफेई यांग द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (स्टूडियो औसिया से) साथ में पेपर [LUKE: डीप कॉन्टेक्स्टुअलाइज्ड एंटिटी रिप्रेजेंटेशन विद एंटिटी-अवेयर सेल्फ-अटेंशन](https ://arxiv.org/abs/2010.01057) Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto द्वारा।
 | 
			
		||||
1. **[LXMERT](https://huggingface.co/docs/transformers/model_doc/lxmert)** (UNC चैपल हिल से) साथ में पेपर [LXMERT: ओपन-डोमेन क्वेश्चन के लिए ट्रांसफॉर्मर से क्रॉस-मोडलिटी एनकोडर रिप्रेजेंटेशन सीखना Answering](https://arxiv.org/abs/1908.07490) हाओ टैन और मोहित बंसल द्वारा।
 | 
			
		||||
1. **[M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)** (from Facebook) released with the paper [Pseudo-Labeling For Massively Multilingual Speech Recognition](https://arxiv.org/abs/2111.00161) by Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, and Ronan Collobert.
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (फेसबुक से) साथ देने वाला पेपर [बियॉन्ड इंग्लिश-सेंट्रिक मल्टीलिंगुअल मशीन ट्रांसलेशन](https://arxiv.org/ एब्स/2010.11125) एंजेला फैन, श्रुति भोसले, होल्गर श्वेन्क, झी मा, अहमद अल-किश्की, सिद्धार्थ गोयल, मनदीप बैनेस, ओनूर सेलेबी, गुइल्लाम वेन्जेक, विश्रव चौधरी, नमन गोयल, टॉम बर्च, विटाली लिपचिंस्की, सर्गेई एडुनोव, एडौर्ड द्वारा ग्रेव, माइकल औली, आर्मंड जौलिन द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Jörg द्वारा [OPUS](http://opus.nlpl.eu/) डेटा से प्रशिक्षित मशीनी अनुवाद मॉडल पोस्ट किया गया टाइडेमैन द्वारा। [मैरियन फ्रेमवर्क](https://marian-nmt.github.io/) माइक्रोसॉफ्ट ट्रांसलेटर टीम द्वारा विकसित।
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (माइक्रोसॉफ्ट रिसर्च एशिया से) साथ में पेपर [मार्कअपएलएम: विजुअली-रिच डॉक्यूमेंट अंडरस्टैंडिंग के लिए टेक्स्ट और मार्कअप लैंग्वेज का प्री-ट्रेनिंग] (https://arxiv.org/abs/2110.08518) जुनलॉन्ग ली, यिहेंग जू, लेई कुई, फुरु द्वारा वी द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (FAIR and UIUC से) Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar. द्वाराअनुसंधान पत्र [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) के साथ जारी किया गया
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (मेटा और UIUC से) पेपर के साथ जारी किया गया [प्रति-पिक्सेल वर्गीकरण वह सब नहीं है जिसकी आपको सिमेंटिक सेगमेंटेशन की आवश्यकता है] (https://arxiv.org/abs/2107.06278) बोवेन चेंग, अलेक्जेंडर जी. श्विंग, अलेक्जेंडर किरिलोव द्वारा >>>>>> रिबेस ठीक करें
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (फेसबुक से) साथ में पेपर [न्यूरल मशीन ट्रांसलेशन के लिए मल्टीलिंगुअल डीनोइजिंग प्री-ट्रेनिंग](https://arxiv. org/abs/2001.08210) यिनहान लियू, जियाताओ गु, नमन गोयल, जियान ली, सर्गेई एडुनोव, मार्जन ग़ज़विनिनेजाद, माइक लुईस, ल्यूक ज़ेटलमॉयर द्वारा।
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (फेसबुक से) साथ में पेपर [एक्स्टेंसिबल बहुभाषी प्रीट्रेनिंग और फाइनट्यूनिंग के साथ बहुभाषी अनुवाद](https://arxiv युकिंग टैंग, चाउ ट्रान, जियान ली, पेंग-जेन चेन, नमन गोयल, विश्रव चौधरी, जियाताओ गु, एंजेला फैन द्वारा .org/abs/2008.00401)।
 | 
			
		||||
1. **[Megatron-BERT](https://huggingface.co/docs/transformers/model_doc/megatron-bert)** (NVIDIA से) कागज के साथ [Megatron-LM: मॉडल का उपयोग करके बहु-अरब पैरामीटर भाषा मॉडल का प्रशिक्षण Parallelism](https://arxiv.org/abs/1909.08053) मोहम्मद शोएबी, मोस्टोफा पटवारी, राउल पुरी, पैट्रिक लेग्रेस्ले, जेरेड कैस्पर और ब्रायन कैटानज़ारो द्वारा।
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (NVIDIA से) साथ वाला पेपर [Megatron-LM: ट्रेनिंग मल्टी-बिलियन पैरामीटर लैंग्वेज मॉडल्स यूजिंग मॉडल पैरेललिज़्म] (https://arxiv.org/abs/1909.08053) मोहम्मद शोएबी, मोस्टोफा पटवारी, राउल पुरी, पैट्रिक लेग्रेस्ले, जेरेड कैस्पर और ब्रायन कैटानज़ारो द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (फ्रॉम Studio Ousia) साथ में पेपर [mLUKE: द पावर ऑफ एंटिटी रिप्रेजेंटेशन इन मल्टीलिंगुअल प्रीट्रेन्ड लैंग्वेज मॉडल्स](https://arxiv.org/abs/2110.08151) रयोकन री, इकुया यामाडा, और योशिमासा त्सुरोका द्वारा।
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (सीएमयू/गूगल ब्रेन से) साथ में कागज [मोबाइलबर्ट: संसाधन-सीमित उपकरणों के लिए एक कॉम्पैक्ट टास्क-अज्ञेय बीईआरटी] (https://arxiv.org/abs/2004.02984) Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, और Denny Zhou द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (from Google Inc.) released with the paper [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam.
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (from Google Inc.) released with the paper [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (Apple से) साथ में कागज [MobileViT: लाइट-वेट, जनरल-पर्पस, और मोबाइल-फ्रेंडली विजन ट्रांसफॉर्मर] (https://arxiv.org/abs/2110.02178) सचिन मेहता और मोहम्मद रस्तगरी द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (Google AI से) साथ वाला पेपर [mT5: एक व्यापक बहुभाषी पूर्व-प्रशिक्षित टेक्स्ट-टू-टेक्स्ट ट्रांसफॉर्मर]( https://arxiv.org/abs/2010.11934) लिंटिंग ज़ू, नोआ कॉन्सटेंट, एडम रॉबर्ट्स, मिहिर काले, रामी अल-रफू, आदित्य सिद्धांत, आदित्य बरुआ, कॉलिन रैफेल द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (from SHI Labs) released with the paper [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (हुआवेई नूह के आर्क लैब से) साथ में कागज़ [NEZHA: चीनी भाषा समझ के लिए तंत्रिका प्रासंगिक प्रतिनिधित्व](https :/ /arxiv.org/abs/1909.00204) जुन्किउ वेई, ज़ियाओज़े रेन, ज़िआओगुआंग ली, वेनयोंग हुआंग, यी लियाओ, याशेंग वांग, जियाशू लिन, शिन जियांग, जिओ चेन और कुन लियू द्वारा।
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (फ्रॉम मेटा) साथ में पेपर [नो लैंग्वेज लेफ्ट बिहाइंड: स्केलिंग ह्यूमन-सेंटेड मशीन ट्रांसलेशन] (https://arxiv.org/abs/2207.04672) एनएलएलबी टीम द्वारा प्रकाशित।
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (विस्कॉन्सिन विश्वविद्यालय - मैडिसन से) साथ में कागज [Nyströmformer: A Nyström- आधारित एल्गोरिथम आत्म-ध्यान का अनुमान लगाने के लिए ](https://arxiv.org/abs/2102.03902) युनयांग ज़िओंग, झानपेंग ज़ेंग, रुद्रसिस चक्रवर्ती, मिंगक्सिंग टैन, ग्लेन फंग, यिन ली, विकास सिंह द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (SHI Labs से) पेपर [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) जितेश जैन, जिआचेन ली, मांगटिक चिउ, अली हसनी, निकिता ओरलोव, हम्फ्री शि के द्वारा जारी किया गया है।
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (Google AI से) साथ में कागज [विज़न ट्रांसफॉर्मर्स के साथ सिंपल ओपन-वोकैबुलरी ऑब्जेक्ट डिटेक्शन](https:/ /arxiv.org/abs/2205.06230) मैथियास मिंडरर, एलेक्सी ग्रिट्सेंको, ऑस्टिन स्टोन, मैक्सिम न्यूमैन, डिर्क वीसेनबोर्न, एलेक्सी डोसोवित्स्की, अरविंद महेंद्रन, अनुराग अर्नब, मुस्तफा देहघानी, ज़ुओरन शेन, जिओ वांग, ज़ियाओहुआ झाई, थॉमस किफ़, और नील हॉल्सबी द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
1. **[PEGASUS-X](https://huggingface.co/docs/transformers/model_doc/pegasus_x)** (Google की ओर से) साथ में दिया गया पेपर [लंबे इनपुट सारांश के लिए ट्रांसफ़ॉर्मरों को बेहतर तरीके से एक्सटेंड करना](https://arxiv .org/abs/2208.04347) जेसन फांग, याओ झाओ, पीटर जे लियू द्वारा।
 | 
			
		||||
1. **[Perceiver IO](https://huggingface.co/docs/transformers/model_doc/perceiver)** (दीपमाइंड से) साथ में पेपर [पर्सीवर आईओ: संरचित इनपुट और आउटपुट के लिए एक सामान्य वास्तुकला] (https://arxiv.org/abs/2107.14795) एंड्रयू जेगल, सेबेस्टियन बोरग्यूड, जीन-बैप्टिस्ट अलायराक, कार्ल डोर्श, कैटलिन इओनेस्कु, डेविड द्वारा डिंग, स्कंद कोप्पुला, डैनियल ज़ोरान, एंड्रयू ब्रॉक, इवान शेलहैमर, ओलिवियर हेनाफ, मैथ्यू एम। बोट्विनिक, एंड्रयू ज़िसरमैन, ओरिओल विनियल्स, जोआओ कैरेरा द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[PhoBERT](https://huggingface.co/docs/transformers/model_doc/phobert)** (VinAI Research से) कागज के साथ [PhoBERT: वियतनामी के लिए पूर्व-प्रशिक्षित भाषा मॉडल](https://www .aclweb.org/anthology/2020.findings-emnlp.92/) डैट क्वोक गुयेन और अन्ह तुआन गुयेन द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[PLBart](https://huggingface.co/docs/transformers/model_doc/plbart)** (UCLA NLP से) साथ वाला पेपर [प्रोग्राम अंडरस्टैंडिंग एंड जेनरेशन के लिए यूनिफाइड प्री-ट्रेनिंग](https://arxiv .org/abs/2103.06333) वसी उद्दीन अहमद, सैकत चक्रवर्ती, बैशाखी रे, काई-वेई चांग द्वारा।
 | 
			
		||||
1. **[PoolFormer](https://huggingface.co/docs/transformers/model_doc/poolformer)** (from Sea AI Labs) released with the paper [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418) by Yu, Weihao and Luo, Mi and Zhou, Pan and Si, Chenyang and Zhou, Yichen and Wang, Xinchao and Feng, Jiashi and Yan, Shuicheng.
 | 
			
		||||
1. **[ProphetNet](https://huggingface.co/docs/transformers/model_doc/prophetnet)** (माइक्रोसॉफ्ट रिसर्च से) साथ में पेपर [ProphetNet: प्रेडिक्टिंग फ्यूचर एन-ग्राम फॉर सीक्वेंस-टू-सीक्वेंस प्री-ट्रेनिंग ](https://arxiv.org/abs/2001.04063) यू यान, वीज़ेन क्यूई, येयुन गोंग, दयाहेंग लियू, नान डुआन, जिउशेंग चेन, रुओफ़ेई झांग और मिंग झोउ द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[QDQBert](https://huggingface.co/docs/transformers/model_doc/qdqbert)** (NVIDIA से) साथ वाला पेपर [डीप लर्निंग इंफ़ेक्शन के लिए इंटीजर क्वांटिज़ेशन: प्रिंसिपल्स एंड एम्पिरिकल इवैल्यूएशन](https:// arxiv.org/abs/2004.09602) हाओ वू, पैट्रिक जुड, जिआओजी झांग, मिखाइल इसेव और पॉलियस माइकेविसियस द्वारा।
 | 
			
		||||
1. **[RAG](https://huggingface.co/docs/transformers/model_doc/rag)** (फेसबुक से) साथ में कागज [रिट्रीवल-ऑगमेंटेड जेनरेशन फॉर नॉलेज-इंटेंसिव एनएलपी टास्क](https://arxiv .org/abs/2005.11401) पैट्रिक लुईस, एथन पेरेज़, अलेक्जेंड्रा पिक्टस, फैबियो पेट्रोनी, व्लादिमीर कारपुखिन, नमन गोयल, हेनरिक कुटलर, माइक लुईस, वेन-ताउ यिह, टिम रॉकटाशेल, सेबस्टियन रिडेल, डौवे कीला द्वारा।
 | 
			
		||||
1. **[REALM](https://huggingface.co/docs/transformers/model_doc/realm.html)** (Google अनुसंधान से) केल्विन गु, केंटन ली, ज़ोरा तुंग, पानुपोंग पसुपत और मिंग-वेई चांग द्वारा साथ में दिया गया पेपर [REALM: रिट्रीवल-ऑगमेंटेड लैंग्वेज मॉडल प्री-ट्रेनिंग](https://arxiv.org/abs/2002.08909)।
 | 
			
		||||
1. **[Reformer](https://huggingface.co/docs/transformers/model_doc/reformer)** (from Google Research) released with the paper [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451) by Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya.
 | 
			
		||||
1. **[RegNet](https://huggingface.co/docs/transformers/model_doc/regnet)** (META रिसर्च से) [डिज़ाइनिंग नेटवर्क डिज़ाइन स्पेस] (https://arxiv.org/) पेपर के साथ जारी किया गया एब्स/2003.13678) इलिजा राडोसावोविक, राज प्रतीक कोसाराजू, रॉस गिर्शिक, कैमिंग ही, पिओटर डॉलर द्वारा।
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (गूगल रिसर्च से) साथ वाला पेपर [पूर्व-प्रशिक्षित भाषा मॉडल में एम्बेडिंग कपलिंग पर पुनर्विचार](https://arxiv .org/pdf/2010.12821.pdf) ह्युंग वोन चुंग, थिबॉल्ट फ़ेवरी, हेनरी त्साई, एम. जॉनसन, सेबेस्टियन रुडर द्वारा।
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (माइक्रोसॉफ्ट रिसर्च से) [डीप रेसिडुअल लर्निंग फॉर इमेज रिकग्निशन] (https://arxiv. org/abs/1512.03385) कैमिंग हे, जियांग्यु झांग, शाओकिंग रेन, जियान सन द्वारा।
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (फेसबुक से), साथ में कागज [मजबूत रूप से अनुकूलित BERT प्रीट्रेनिंग दृष्टिकोण](https://arxiv.org/abs /1907.11692) यिनहान लियू, मायल ओट, नमन गोयल, जिंगफेई डू, मंदार जोशी, डैनकी चेन, ओमर लेवी, माइक लुईस, ल्यूक ज़ेटलमॉयर, वेसेलिन स्टोयानोव द्वारा।
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (from Facebook) released with the paper [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (from WeChatAI) released with the paper [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) by HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (झुईई टेक्नोलॉजी से), साथ में पेपर [रोफॉर्मर: रोटरी पोजिशन एंबेडिंग के साथ एन्हांस्ड ट्रांसफॉर्मर] (https://arxiv.org/pdf/2104.09864v1.pdf) जियानलिन सु और यू लू और शेंगफेंग पैन और बो वेन और युनफेंग लियू द्वारा प्रकाशित।
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (ASAPP से) साथ देने वाला पेपर [भाषण पहचान के लिए अनसुपरवाइज्ड प्री-ट्रेनिंग में परफॉर्मेंस-एफिशिएंसी ट्रेड-ऑफ्स](https ://arxiv.org/abs/2109.06870) फेलिक्स वू, क्वांगयुन किम, जिंग पैन, क्यू हान, किलियन क्यू. वेनबर्गर, योव आर्टज़ी द्वारा।
 | 
			
		||||
1. **[SEW-D](https://huggingface.co/docs/transformers/model_doc/sew_d)** (ASAPP से) साथ में पेपर [भाषण पहचान के लिए अनसुपरवाइज्ड प्री-ट्रेनिंग में परफॉर्मेंस-एफिशिएंसी ट्रेड-ऑफ्स] (https://arxiv.org/abs/2109.06870) फेलिक्स वू, क्वांगयुन किम, जिंग पैन, क्यू हान, किलियन क्यू. वेनबर्गर, योआव आर्टज़ी द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[SpeechToTextTransformer](https://huggingface.co/docs/transformers/model_doc/speech_to_text)** (फेसबुक से), साथ में पेपर [फेयरसेक S2T: फास्ट स्पीच-टू-टेक्स्ट मॉडलिंग विद फेयरसेक](https: //arxiv.org/abs/2010.05171) चांगहान वांग, यूं तांग, जुताई मा, ऐनी वू, दिमित्रो ओखोनको, जुआन पिनो द्वारा पोस्ट किया गया。
 | 
			
		||||
1. **[SpeechToTextTransformer2](https://huggingface.co/docs/transformers/model_doc/speech_to_text_2)** (फेसबुक से) साथ में पेपर [लार्ज-स्केल सेल्फ- एंड सेमी-सुपरवाइज्ड लर्निंग फॉर स्पीच ट्रांसलेशन](https://arxiv.org/abs/2104.06678) चांगहान वांग, ऐनी वू, जुआन पिनो, एलेक्सी बेवस्की, माइकल औली, एलेक्सिस द्वारा Conneau द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Splinter](https://huggingface.co/docs/transformers/model_doc/splinter)** (तेल अवीव यूनिवर्सिटी से) साथ में पेपर [स्पैन सिलेक्शन को प्री-ट्रेनिंग करके कुछ-शॉट क्वेश्चन आंसरिंग](https:// arxiv.org/abs/2101.00438) ओरि राम, युवल कर्स्टन, जोनाथन बेरेंट, अमीर ग्लोबर्सन, ओमर लेवी द्वारा।
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (बर्कले से) कागज के साथ [SqueezeBERT: कुशल तंत्रिका नेटवर्क के बारे में NLP को कंप्यूटर विज़न क्या सिखा सकता है?](https: //arxiv.org/abs/2006.11316) फॉरेस्ट एन. इनडोला, अल्बर्ट ई. शॉ, रवि कृष्णा, और कर्ट डब्ल्यू. केटज़र द्वारा।
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (माइक्रोसॉफ्ट से) साथ में कागज [स्वाइन ट्रांसफॉर्मर: शिफ्टेड विंडोज का उपयोग कर पदानुक्रमित विजन ट्रांसफॉर्मर](https://arxiv .org/abs/2103.14030) ज़ी लियू, युटोंग लिन, यू काओ, हान हू, यिक्सुआन वेई, झेंग झांग, स्टीफन लिन, बैनिंग गुओ द्वारा।
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (Microsoft से) साथ वाला पेपर [Swin Transformer V2: स्केलिंग अप कैपेसिटी एंड रेजोल्यूशन](https:// ज़ी लियू, हान हू, युटोंग लिन, ज़ुलिआंग याओ, ज़ेंडा ज़ी, यिक्सुआन वेई, जिया निंग, यू काओ, झेंग झांग, ली डोंग, फुरु वेई, बैनिंग गुओ द्वारा arxiv.org/abs/2111.09883।
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (from University of Würzburg) released with the paper [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) by Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte.
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer.
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (来自 Google AI)कॉलिन रैफेल और नोम शज़ीर और एडम रॉबर्ट्स और कैथरीन ली और शरण नारंग और माइकल मटेना द्वारा साथ में पेपर [एक एकीकृत टेक्स्ट-टू-टेक्स्ट ट्रांसफॉर्मर के साथ स्थानांतरण सीखने की सीमा की खोज] (https://arxiv.org/abs/1910.10683) और यांकी झोउ और वेई ली और पीटर जे लियू।
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (Google AI से) साथ वाला पेपर [google-research/text-to-text-transfer- ट्रांसफॉर्मर](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) कॉलिन रैफेल और नोम शज़ीर और एडम रॉबर्ट्स और कैथरीन ली और शरण नारंग द्वारा और माइकल मटेना और यांकी झोउ और वेई ली और पीटर जे लियू।
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (माइक्रोसॉफ्ट रिसर्च से) साथ में पेपर [पबटेबल्स-1एम: टूवर्ड्स कॉम्प्रिहेंसिव टेबल एक्सट्रैक्शन फ्रॉम अनस्ट्रक्चर्ड डॉक्यूमेंट्स ](https://arxiv.org/abs/2110.00061) ब्रैंडन स्मॉक, रोहित पेसाला, रॉबिन अब्राहम द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (Google AI से) साथ में कागज [TAPAS: पूर्व-प्रशिक्षण के माध्यम से कमजोर पर्यवेक्षण तालिका पार्सिंग](https:// arxiv.org/abs/2004.02349) जोनाथन हर्ज़िग, पावेल क्रिज़िस्तोफ़ नोवाक, थॉमस मुलर, फ्रांसेस्को पिकिन्नो और जूलियन मार्टिन ईसेन्च्लोस द्वारा।
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (माइक्रोसॉफ्ट रिसर्च से) साथ में पेपर [TAPEX: टेबल प्री-ट्रेनिंग थ्रू लर्निंग अ न्यूरल SQL एक्ज़ीक्यूटर](https: //arxiv.org/abs/2107.07653) कियान लियू, बेई चेन, जियाकी गुओ, मोर्टेज़ा ज़ियादी, ज़ेकी लिन, वीज़ू चेन, जियान-गुआंग लू द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (Google/CMU की ओर से) कागज के साथ [संस्करण-एक्स: एक ब्लॉग मॉडल चौकस चौक मॉडल मॉडल] (https://arxivorg/abs/1901.02860) क्वोकोक वी. ले, रुस्लैन सलाखुतदी
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (from Microsoft) released with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler 
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (माइक्रोसॉफ्ट रिसर्च से) साथ में दिया गया पेपर [UniSpeech: यूनिफाइड स्पीच रिप्रेजेंटेशन लर्निंग विद लेबलेड एंड अनलेबल्ड डेटा](https:/ /arxiv.org/abs/2101.07597) चेंगई वांग, यू वू, याओ कियान, केनिची कुमातानी, शुजी लियू, फुरु वेई, माइकल ज़ेंग, ज़ुएदोंग हुआंग द्वारा।
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (माइक्रोसॉफ्ट रिसर्च से) कागज के साथ [UNISPEECH-SAT: यूनिवर्सल स्पीच रिप्रेजेंटेशन लर्निंग विद स्पीकर अवेयर प्री-ट्रेनिंग ](https://arxiv.org/abs/2110.05752) सानयुआन चेन, यू वू, चेंग्यी वांग, झेंगयांग चेन, झूओ चेन, शुजी लियू, जियान वू, याओ कियान, फुरु वेई, जिन्यु ली, जियांगज़ान यू द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (from Peking University) released with the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (सिंघुआ यूनिवर्सिटी और ननकाई यूनिवर्सिटी से) साथ में पेपर [विजुअल अटेंशन नेटवर्क](https://arxiv.org/ pdf/2202.09741.pdf) मेंग-हाओ गुओ, चेंग-ज़े लू, झेंग-निंग लियू, मिंग-मिंग चेंग, शि-मिन हू द्वारा।
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (मल्टीमीडिया कम्प्यूटिंग ग्रुप, नानजिंग यूनिवर्सिटी से) साथ में पेपर [वीडियोएमएई: मास्क्ड ऑटोएन्कोडर स्व-पर्यवेक्षित वीडियो प्री-ट्रेनिंग के लिए डेटा-कुशल सीखने वाले हैं] (https://arxiv.org/abs/2203.12602) ज़ान टोंग, यिबिंग सॉन्ग, जुए द्वारा वांग, लिमिन वांग द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (NAVER AI Lab/Kakao Enterprise/Kakao Brain से) साथ में कागज [ViLT: Vision-and-Language Transformer बिना कनवल्शन या रीजन सुपरविजन](https://arxiv.org/abs/2102.03334) वोनजे किम, बोक्यूंग सोन, इल्डू किम द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (गूगल एआई से) कागज के साथ [एक इमेज इज़ वर्थ 16x16 वर्ड्स: ट्रांसफॉर्मर्स फॉर इमेज रिकॉग्निशन एट स्केल](https://arxiv.org/abs/2010.11929) एलेक्सी डोसोवित्स्की, लुकास बेयर, अलेक्जेंडर कोलेसनिकोव, डिर्क वीसेनबोर्न, शियाओहुआ झाई, थॉमस अनटरथिनर, मुस्तफा देहघानी, मैथियास मिंडरर, जॉर्ज हेगोल्ड, सिल्वेन गेली, जैकब उस्ज़कोरेइट द्वारा हॉल्सबी द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (UCLA NLP से) साथ वाला पेपर [VisualBERT: A Simple and Performant Baseline for Vision and Language](https:/ /arxiv.org/pdf/1908.03557) लियुनियन हेरोल्ड ली, मार्क यात्स्कर, दा यिन, चो-जुई हसीह, काई-वेई चांग द्वारा।
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (मेटा एआई से) साथ में कागज [मास्कड ऑटोएन्कोडर स्केलेबल विजन लर्नर्स हैं](https://arxiv.org/ एब्स/2111.06377) कैमिंग हे, ज़िनेली चेन, सेनिंग ज़ी, यांगहो ली, पिओट्र डॉलर, रॉस गिर्शिक द्वारा।
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (मेटा एआई से) साथ में कागज [लेबल-कुशल सीखने के लिए मास्क्ड स्याम देश के नेटवर्क](https://arxiv. org/abs/2204.07141) महमूद असरान, मथिल्डे कैरन, ईशान मिश्रा, पियोट्र बोजानोवस्की, फ्लोरियन बोर्डेस, पास्कल विंसेंट, आर्मंड जौलिन, माइकल रब्बत, निकोलस बल्लास द्वारा।
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (फेसबुक एआई से) साथ में पेपर [wav2vec 2.0: ए फ्रेमवर्क फॉर सेल्फ-सुपरवाइज्ड लर्निंग ऑफ स्पीच रिप्रेजेंटेशन] (https://arxiv.org/abs/2006.11477) एलेक्सी बेवस्की, हेनरी झोउ, अब्देलरहमान मोहम्मद, माइकल औली द्वारा।
 | 
			
		||||
1. **[Wav2Vec2-Conformer](https://huggingface.co/docs/transformers/model_doc/wav2vec2-conformer)** (Facebook AI से) साथ वाला पेपर [FAIRSEQ S2T: FAIRSEQ के साथ फास्ट स्पीच-टू-टेक्स्ट मॉडलिंग ](https://arxiv.org/abs/2010.05171) चांगहान वांग, यूं तांग, जुताई मा, ऐनी वू, सरव्या पोपुरी, दिमित्रो ओखोनको, जुआन पिनो द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[Wav2Vec2Phoneme](https://huggingface.co/docs/transformers/model_doc/wav2vec2_phoneme)** (Facebook AI से) साथ वाला पेपर [सरल और प्रभावी जीरो-शॉट क्रॉस-लिंगुअल फोनेम रिकॉग्निशन](https:/ /arxiv.org/abs/2109.11680) कियानटोंग जू, एलेक्सी बाएव्स्की, माइकल औली द्वारा।
 | 
			
		||||
1. **[WavLM](https://huggingface.co/docs/transformers/model_doc/wavlm)** (माइक्रोसॉफ्ट रिसर्च से) पेपर के साथ जारी किया गया [WavLM: फुल स्टैक के लिए बड़े पैमाने पर स्व-पर्यवेक्षित पूर्व-प्रशिक्षण स्पीच प्रोसेसिंग] (https://arxiv.org/abs/2110.13900) सानयुआन चेन, चेंगयी वांग, झेंगयांग चेन, यू वू, शुजी लियू, ज़ुओ चेन, जिन्यु ली, नाओयुकी कांडा, ताकुया योशियोका, ज़िओंग जिओ, जियान वू, लॉन्ग झोउ, शुओ रेन, यानमिन कियान, याओ कियान, जियान वू, माइकल ज़ेंग, फुरु वेई।
 | 
			
		||||
1. **[Whisper](https://huggingface.co/docs/transformers/model_doc/whisper)** (OpenAI से) साथ में कागज [बड़े पैमाने पर कमजोर पर्यवेक्षण के माध्यम से मजबूत भाषण पहचान](https://cdn. openai.com/papers/whisper.pdf) एलेक रैडफोर्ड, जोंग वूक किम, ताओ जू, ग्रेग ब्रॉकमैन, क्रिस्टीन मैकलीवे, इल्या सुत्स्केवर द्वारा।
 | 
			
		||||
1. **[X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)** (माइक्रोसॉफ्ट रिसर्च से) कागज के साथ [एक्सपैंडिंग लैंग्वेज-इमेज प्रीट्रेन्ड मॉडल फॉर जनरल वीडियो रिकग्निशन](https: //arxiv.org/abs/2208.02816) बोलिन नी, होउवेन पेंग, मिंगाओ चेन, सोंगयांग झांग, गाओफेंग मेंग, जियानलोंग फू, शिमिंग जियांग, हैबिन लिंग द्वारा।
 | 
			
		||||
1. **[XGLM](https://huggingface.co/docs/transformers/model_doc/xglm)** (From Facebook AI) released with the paper [Few-shot Learning with Multilingual Language Models](https://arxiv.org/abs/2112.10668) by Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O'Horo, Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li.
 | 
			
		||||
1. **[XLM](https://huggingface.co/docs/transformers/model_doc/xlm)** (फेसबुक से) साथ में पेपर [क्रॉस-लिंगुअल लैंग्वेज मॉडल प्रीट्रेनिंग] (https://arxiv.org/abs/1901.07291) गिलाउम लैम्पल और एलेक्सिस कोनो द्वारा।
 | 
			
		||||
1. **[XLM-ProphetNet](https://huggingface.co/docs/transformers/model_doc/xlm-prophetnet)** (माइक्रोसॉफ्ट रिसर्च से) साथ में कागज [ProphetNet: प्रेडिक्टिंग फ्यूचर एन-ग्राम फॉर सीक्वेंस-टू- सीक्वेंस प्री-ट्रेनिंग](https://arxiv.org/abs/2001.04063) यू यान, वीज़ेन क्यूई, येयुन गोंग, दयाहेंग लियू, नान डुआन, जिउशेंग चेन, रुओफ़ेई झांग और मिंग झोउ द्वारा।
 | 
			
		||||
1. **[XLM-RoBERTa](https://huggingface.co/docs/transformers/model_doc/xlm-roberta)** (फेसबुक एआई से), साथ में पेपर [अनसुपरवाइज्ड क्रॉस-लिंगुअल रिप्रेजेंटेशन लर्निंग एट स्केल] (https://arxiv.org/abs/1911.02116) एलेक्सिस कोन्यू*, कार्तिकेय खंडेलवाल*, नमन गोयल, विश्रव चौधरी, गिलाउम वेनज़ेक, फ्रांसिस्को गुज़मैन द्वारा , एडौर्ड ग्रेव, मायल ओट, ल्यूक ज़ेटलमॉयर और वेसेलिन स्टोयानोव द्वारा।
 | 
			
		||||
1. **[XLM-RoBERTa-XL](https://huggingface.co/docs/transformers/model_doc/xlm-roberta-xl)** (Facebook AI से) साथ में कागज [बहुभाषी नकाबपोश भाषा के लिए बड़े पैमाने पर ट्रांसफॉर्मर ] मॉडलिंग](https://arxiv.org/abs/2105.00572) नमन गोयल, जिंगफेई डू, मायल ओट, गिरि अनंतरामन, एलेक्सिस कोनो द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[XLNet](https://huggingface.co/docs/transformers/model_doc/xlnet)** (Google/CMU से) साथ वाला पेपर [XLNet: जनरलाइज्ड ऑटोरेग्रेसिव प्रीट्रेनिंग फॉर लैंग्वेज अंडरस्टैंडिंग](https://arxiv ज़ीलिन यांग*, ज़िहांग दाई*, यिमिंग यांग, जैम कार्बोनेल, रुस्लान सलाखुतदीनोव, क्वोक वी. ले द्वारा .org/abs/1906.08237)।
 | 
			
		||||
1. **[XLS-R](https://huggingface.co/docs/transformers/model_doc/xls_r)** (Facebook AI से) साथ वाला पेपर [XLS-R: सेल्फ सुपरवाइज्ड क्रॉस-लिंगुअल स्पीच रिप्रेजेंटेशन लर्निंग एट स्केल](https://arxiv.org/abs/2111.09296) अरुण बाबू, चांगहान वांग, एंड्रोस तजंद्रा, कुशाल लखोटिया, कियानटोंग जू, नमन गोयल, कृतिका सिंह, पैट्रिक वॉन प्लैटन, याथार्थ सराफ, जुआन पिनो, एलेक्सी बेवस्की, एलेक्सिस कोन्यू, माइकल औली द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[XLSR-Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/xlsr_wav2vec2)** (फेसबुक एआई से) साथ में पेपर [अनसुपरवाइज्ड क्रॉस-लिंगुअल रिप्रेजेंटेशन लर्निंग फॉर स्पीच रिकग्निशन] (https://arxiv.org/abs/2006.13979) एलेक्सिस कोन्यू, एलेक्सी बेवस्की, रोनन कोलोबर्ट, अब्देलरहमान मोहम्मद, माइकल औली द्वारा।
 | 
			
		||||
1. **[YOLOS](https://huggingface.co/docs/transformers/model_doc/yolos)** (हुआझोंग यूनिवर्सिटी ऑफ साइंस एंड टेक्नोलॉजी से) साथ में पेपर [यू ओनली लुक एट वन सीक्वेंस: रीथिंकिंग ट्रांसफॉर्मर इन विज़न थ्रू ऑब्जेक्ट डिटेक्शन](https://arxiv.org/abs/2106.00666) युक्सिन फेंग, बेनचेंग लियाओ, जिंगगैंग वांग, जेमिन फेंग, जियांग क्यूई, रुई वू, जियानवेई नीयू, वेन्यू लियू द्वारा पोस्ट किया गया।
 | 
			
		||||
1. **[YOSO](https://huggingface.co/docs/transformers/model_doc/yoso)** (विस्कॉन्सिन विश्वविद्यालय - मैडिसन से) साथ में पेपर [यू ओनली सैंपल (लगभग) ज़ानपेंग ज़ेंग, युनयांग ज़िओंग द्वारा , सत्य एन. रवि, शैलेश आचार्य, ग्लेन फंग, विकास सिंह द्वारा पोस्ट किया गया।
 | 
			
		||||
1. एक नए मॉडल में योगदान देना चाहते हैं? नए मॉडल जोड़ने में आपका मार्गदर्शन करने के लिए हमारे पास एक **विस्तृत मार्गदर्शिका और टेम्प्लेट** है। आप उन्हें [`टेम्पलेट्स`](./templates) निर्देशिका में पा सकते हैं। पीआर शुरू करने से पहले [योगदान दिशानिर्देश] (./CONTRIBUTING.md) देखना और अनुरक्षकों से संपर्क करना या प्रतिक्रिया प्राप्त करने के लिए एक नया मुद्दा खोलना याद रखें।
 | 
			
		||||
 | 
			
		||||
यह जांचने के लिए कि क्या किसी मॉडल में पहले से ही Flax, PyTorch या TensorFlow का कार्यान्वयन है, या यदि उसके पास Tokenizers लाइब्रेरी में संबंधित टोकन है, तो [यह तालिका] (https://huggingface.co/ docs/transformers/index#supported) देखें। -फ्रेमवर्क)।
 | 
			
		||||
 | 
			
		||||
इन कार्यान्वयनों का परीक्षण कई डेटासेट पर किया गया है (देखें केस स्क्रिप्ट का उपयोग करें) और वैनिला कार्यान्वयन के लिए तुलनात्मक रूप से प्रदर्शन करना चाहिए। आप उपयोग के मामले के दस्तावेज़ [इस अनुभाग](https://huggingface.co/docs/transformers/examples) में व्यवहार का विवरण पढ़ सकते हैं।
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## अधिक समझें
 | 
			
		||||
 | 
			
		||||
|अध्याय | विवरण |
 | 
			
		||||
|-|-|
 | 
			
		||||
| [दस्तावेज़ीकरण](https://huggingface.co/transformers/) | पूरा एपीआई दस्तावेज़ीकरण और ट्यूटोरियल |
 | 
			
		||||
| [कार्य सारांश](https://huggingface.co/docs/transformers/task_summary) | ट्रांसफॉर्मर समर्थित कार्य |
 | 
			
		||||
| [प्रीप्रोसेसिंग ट्यूटोरियल](https://huggingface.co/docs/transformers/preprocessing) | मॉडल के लिए डेटा तैयार करने के लिए `टोकनाइज़र` का उपयोग करना |
 | 
			
		||||
| [प्रशिक्षण और फाइन-ट्यूनिंग](https://huggingface.co/docs/transformers/training) | PyTorch/TensorFlow के ट्रेनिंग लूप या `ट्रेनर` API में ट्रांसफॉर्मर द्वारा दिए गए मॉडल का उपयोग करें |
 | 
			
		||||
| [क्विक स्टार्ट: ट्वीकिंग एंड यूज़ केस स्क्रिप्ट्स](https://github.com/huggingface/transformers/tree/main/examples) | विभिन्न कार्यों के लिए केस स्क्रिप्ट का उपयोग करें |
 | 
			
		||||
| [मॉडल साझा करना और अपलोड करना](https://huggingface.co/docs/transformers/model_sharing) | समुदाय के साथ अपने फाइन टूनड मॉडल अपलोड और साझा करें |
 | 
			
		||||
| [माइग्रेशन](https://huggingface.co/docs/transformers/migration) | `पाइटोरच-ट्रांसफॉर्मर्स` या `पाइटोरच-प्रीट्रेनड-बर्ट` से ट्रांसफॉर्मर में माइग्रेट करना |
 | 
			
		||||
 | 
			
		||||
## उद्धरण
 | 
			
		||||
 | 
			
		||||
हमने आधिकारिक तौर पर इस लाइब्रेरी का [पेपर](https://www.aclweb.org/anthology/2020.emnlp-demos.6/) प्रकाशित किया है, अगर आप ट्रान्सफ़ॉर्मर्स लाइब्रेरी का उपयोग करते हैं, तो कृपया उद्धृत करें:
 | 
			
		||||
```bibtex
 | 
			
		||||
@inproceedings{wolf-etal-2020-transformers,
 | 
			
		||||
    title = "Transformers: State-of-the-Art Natural Language Processing",
 | 
			
		||||
    author = "Thomas Wolf and Lysandre Debut and Victor Sanh and Julien Chaumond and Clement Delangue and Anthony Moi and Pierric Cistac and Tim Rault and Rémi Louf and Morgan Funtowicz and Joe Davison and Sam Shleifer and Patrick von Platen and Clara Ma and Yacine Jernite and Julien Plu and Canwen Xu and Teven Le Scao and Sylvain Gugger and Mariama Drame and Quentin Lhoest and Alexander M. Rush",
 | 
			
		||||
    booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
 | 
			
		||||
    month = oct,
 | 
			
		||||
    year = "2020",
 | 
			
		||||
    address = "Online",
 | 
			
		||||
    publisher = "Association for Computational Linguistics",
 | 
			
		||||
    url = "https://www.aclweb.org/anthology/2020.emnlp-demos.6",
 | 
			
		||||
    pages = "38--45"
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										508
									
								
								README_ja.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										508
									
								
								README_ja.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,508 @@
 | 
			
		||||
<!---
 | 
			
		||||
Copyright 2020 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
you may not use this file except in compliance with the License.
 | 
			
		||||
You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
    http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<!---
 | 
			
		||||
A useful guide for English-Traditional Japanese translation of Hugging Face documentation
 | 
			
		||||
- Use square quotes, e.g.,「引用」
 | 
			
		||||
 | 
			
		||||
Dictionary
 | 
			
		||||
 | 
			
		||||
API: API(翻訳しない)
 | 
			
		||||
add: 追加
 | 
			
		||||
checkpoint: チェックポイント
 | 
			
		||||
code: コード
 | 
			
		||||
community: コミュニティ
 | 
			
		||||
confidence: 信頼度
 | 
			
		||||
dataset: データセット
 | 
			
		||||
documentation: ドキュメント
 | 
			
		||||
example: 例
 | 
			
		||||
finetune: 微調整
 | 
			
		||||
Hugging Face: Hugging Face(翻訳しない)
 | 
			
		||||
implementation: 実装
 | 
			
		||||
inference: 推論
 | 
			
		||||
library: ライブラリ
 | 
			
		||||
module: モジュール
 | 
			
		||||
NLP/Natural Language Processing: NLPと表示される場合は翻訳されず、Natural Language Processingと表示される場合は翻訳される
 | 
			
		||||
online demos: オンラインデモ
 | 
			
		||||
pipeline: pipeline(翻訳しない)
 | 
			
		||||
pretrained/pretrain: 学習済み
 | 
			
		||||
Python data structures (e.g., list, set, dict): リスト、セット、ディクショナリと訳され、括弧内は原文英語
 | 
			
		||||
repository: repository(翻訳しない)
 | 
			
		||||
summary: 概要
 | 
			
		||||
token-: token-(翻訳しない)
 | 
			
		||||
Trainer: Trainer(翻訳しない)
 | 
			
		||||
transformer: transformer(翻訳しない)
 | 
			
		||||
tutorial: チュートリアル
 | 
			
		||||
user: ユーザ
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
<p align="center">
 | 
			
		||||
    <br>
 | 
			
		||||
    <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers_logo_name.png" width="400"/>
 | 
			
		||||
    <br>
 | 
			
		||||
<p>
 | 
			
		||||
<p align="center">
 | 
			
		||||
    <a href="https://circleci.com/gh/huggingface/transformers">
 | 
			
		||||
        <img alt="Build" src="https://img.shields.io/circleci/build/github/huggingface/transformers/main">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/blob/main/LICENSE">
 | 
			
		||||
        <img alt="GitHub" src="https://img.shields.io/github/license/huggingface/transformers.svg?color=blue">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://huggingface.co/docs/transformers/index">
 | 
			
		||||
        <img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/transformers/index.svg?down_color=red&down_message=offline&up_message=online">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/releases">
 | 
			
		||||
        <img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/transformers.svg">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md">
 | 
			
		||||
        <img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg">
 | 
			
		||||
    </a>
 | 
			
		||||
    <a href="https://zenodo.org/badge/latestdoi/155220641"><img src="https://zenodo.org/badge/155220641.svg" alt="DOI"></a>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<h4 align="center">
 | 
			
		||||
    <p>
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/">English</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <b>日本語</b> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <p>JAX、PyTorch、TensorFlowのための最先端機械学習</p>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <a href="https://hf.co/course"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/course_banner.png"></a>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
🤗Transformersは、テキスト、視覚、音声などの異なるモダリティに対してタスクを実行するために、事前に学習させた数千のモデルを提供します。
 | 
			
		||||
 | 
			
		||||
これらのモデルは次のような場合に適用できます:
 | 
			
		||||
 | 
			
		||||
* 📝 テキストは、テキストの分類、情報抽出、質問応答、要約、翻訳、テキスト生成などのタスクのために、100以上の言語に対応しています。
 | 
			
		||||
* 🖼️ 画像分類、物体検出、セグメンテーションなどのタスクのための画像。
 | 
			
		||||
* 🗣️ 音声は、音声認識や音声分類などのタスクに使用します。
 | 
			
		||||
 | 
			
		||||
トランスフォーマーモデルは、テーブル質問応答、光学文字認識、スキャン文書からの情報抽出、ビデオ分類、視覚的質問応答など、**複数のモダリティを組み合わせた**タスクも実行可能です。
 | 
			
		||||
 | 
			
		||||
🤗Transformersは、与えられたテキストに対してそれらの事前学習されたモデルを素早くダウンロードして使用し、あなた自身のデータセットでそれらを微調整し、私たちの[model hub](https://huggingface.co/models)でコミュニティと共有するためのAPIを提供します。同時に、アーキテクチャを定義する各Pythonモジュールは完全にスタンドアロンであり、迅速な研究実験を可能にするために変更することができます。
 | 
			
		||||
 | 
			
		||||
🤗Transformersは[Jax](https://jax.readthedocs.io/en/latest/)、[PyTorch](https://pytorch.org/)、[TensorFlow](https://www.tensorflow.org/)という3大ディープラーニングライブラリーに支えられ、それぞれのライブラリをシームレスに統合しています。片方でモデルを学習してから、もう片方で推論用にロードするのは簡単なことです。
 | 
			
		||||
 | 
			
		||||
## オンラインデモ
 | 
			
		||||
 | 
			
		||||
[model hub](https://huggingface.co/models)から、ほとんどのモデルのページで直接テストすることができます。また、パブリックモデル、プライベートモデルに対して、[プライベートモデルのホスティング、バージョニング、推論API](https://huggingface.co/pricing)を提供しています。
 | 
			
		||||
 | 
			
		||||
以下はその一例です:
 | 
			
		||||
 | 
			
		||||
 自然言語処理にて:
 | 
			
		||||
- [BERTによるマスクドワード補完](https://huggingface.co/bert-base-uncased?text=Paris+is+the+%5BMASK%5D+of+France)
 | 
			
		||||
- [Electraによる名前実体認識](https://huggingface.co/dbmdz/electra-large-discriminator-finetuned-conll03-english?text=My+name+is+Sarah+and+I+live+in+London+city)
 | 
			
		||||
- [GPT-2によるテキスト生成](https://huggingface.co/gpt2?text=A+long+time+ago%2C+)
 | 
			
		||||
- [RoBERTaによる自然言語推論](https://huggingface.co/roberta-large-mnli?text=The+dog+was+lost.+Nobody+lost+any+animal)
 | 
			
		||||
- [BARTによる要約](https://huggingface.co/facebook/bart-large-cnn?text=The+tower+is+324+metres+%281%2C063+ft%29+tall%2C+about+the+same+height+as+an+81-storey+building%2C+and+the+tallest+structure+in+Paris.+Its+base+is+square%2C+measuring+125+metres+%28410+ft%29+on+each+side.+During+its+construction%2C+the+Eiffel+Tower+surpassed+the+Washington+Monument+to+become+the+tallest+man-made+structure+in+the+world%2C+a+title+it+held+for+41+years+until+the+Chrysler+Building+in+New+York+City+was+finished+in+1930.+It+was+the+first+structure+to+reach+a+height+of+300+metres.+Due+to+the+addition+of+a+broadcasting+aerial+at+the+top+of+the+tower+in+1957%2C+it+is+now+taller+than+the+Chrysler+Building+by+5.2+metres+%2817+ft%29.+Excluding+transmitters%2C+the+Eiffel+Tower+is+the+second+tallest+free-standing+structure+in+France+after+the+Millau+Viaduct)
 | 
			
		||||
- [DistilBERTによる質問応答](https://huggingface.co/distilbert-base-uncased-distilled-squad?text=Which+name+is+also+used+to+describe+the+Amazon+rainforest+in+English%3F&context=The+Amazon+rainforest+%28Portuguese%3A+Floresta+Amaz%C3%B4nica+or+Amaz%C3%B4nia%3B+Spanish%3A+Selva+Amaz%C3%B3nica%2C+Amazon%C3%ADa+or+usually+Amazonia%3B+French%3A+For%C3%AAt+amazonienne%3B+Dutch%3A+Amazoneregenwoud%29%2C+also+known+in+English+as+Amazonia+or+the+Amazon+Jungle%2C+is+a+moist+broadleaf+forest+that+covers+most+of+the+Amazon+basin+of+South+America.+This+basin+encompasses+7%2C000%2C000+square+kilometres+%282%2C700%2C000+sq+mi%29%2C+of+which+5%2C500%2C000+square+kilometres+%282%2C100%2C000+sq+mi%29+are+covered+by+the+rainforest.+This+region+includes+territory+belonging+to+nine+nations.+The+majority+of+the+forest+is+contained+within+Brazil%2C+with+60%25+of+the+rainforest%2C+followed+by+Peru+with+13%25%2C+Colombia+with+10%25%2C+and+with+minor+amounts+in+Venezuela%2C+Ecuador%2C+Bolivia%2C+Guyana%2C+Suriname+and+French+Guiana.+States+or+departments+in+four+nations+contain+%22Amazonas%22+in+their+names.+The+Amazon+represents+over+half+of+the+planet%27s+remaining+rainforests%2C+and+comprises+the+largest+and+most+biodiverse+tract+of+tropical+rainforest+in+the+world%2C+with+an+estimated+390+billion+individual+trees+divided+into+16%2C000+species)
 | 
			
		||||
- [T5による翻訳](https://huggingface.co/t5-base?text=My+name+is+Wolfgang+and+I+live+in+Berlin)
 | 
			
		||||
 | 
			
		||||
コンピュータビジョンにて:
 | 
			
		||||
- [ViTによる画像分類](https://huggingface.co/google/vit-base-patch16-224)
 | 
			
		||||
- [DETRによる物体検出](https://huggingface.co/facebook/detr-resnet-50)
 | 
			
		||||
- [SegFormerによるセマンティックセグメンテーション](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512)
 | 
			
		||||
- [DETRによるパノプティックセグメンテーション](https://huggingface.co/facebook/detr-resnet-50-panoptic)
 | 
			
		||||
 | 
			
		||||
オーディオにて:
 | 
			
		||||
- [Wav2Vec2による自動音声認識](https://huggingface.co/facebook/wav2vec2-base-960h)
 | 
			
		||||
- [Wav2Vec2によるキーワード検索](https://huggingface.co/superb/wav2vec2-base-superb-ks)
 | 
			
		||||
 | 
			
		||||
マルチモーダルなタスクにて:
 | 
			
		||||
- [ViLTによる視覚的質問応答](https://huggingface.co/dandelin/vilt-b32-finetuned-vqa)
 | 
			
		||||
 | 
			
		||||
Hugging Faceチームによって作られた **[トランスフォーマーを使った書き込み](https://transformer.huggingface.co)** は、このリポジトリのテキスト生成機能の公式デモである。
 | 
			
		||||
 | 
			
		||||
## Hugging Faceチームによるカスタム・サポートをご希望の場合
 | 
			
		||||
 | 
			
		||||
<a target="_blank" href="https://huggingface.co/support">
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a><br>
 | 
			
		||||
 | 
			
		||||
## クイックツアー
 | 
			
		||||
 | 
			
		||||
与えられた入力(テキスト、画像、音声、...)に対してすぐにモデルを使うために、我々は`pipeline`というAPIを提供しております。pipelineは、学習済みのモデルと、そのモデルの学習時に使用された前処理をグループ化したものです。以下は、肯定的なテキストと否定的なテキストを分類するためにpipelineを使用する方法です:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import pipeline
 | 
			
		||||
 | 
			
		||||
# Allocate a pipeline for sentiment-analysis
 | 
			
		||||
>>> classifier = pipeline('sentiment-analysis')
 | 
			
		||||
>>> classifier('We are very happy to introduce pipeline to the transformers repository.')
 | 
			
		||||
[{'label': 'POSITIVE', 'score': 0.9996980428695679}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2行目のコードでは、pipelineで使用される事前学習済みモデルをダウンロードしてキャッシュし、3行目では与えられたテキストに対してそのモデルを評価します。ここでは、答えは99.97%の信頼度で「ポジティブ」です。
 | 
			
		||||
 | 
			
		||||
自然言語処理だけでなく、コンピュータビジョンや音声処理においても、多くのタスクにはあらかじめ訓練された`pipeline`が用意されている。例えば、画像から検出された物体を簡単に抽出することができる:
 | 
			
		||||
 | 
			
		||||
``` python
 | 
			
		||||
>>> import requests
 | 
			
		||||
>>> from PIL import Image
 | 
			
		||||
>>> from transformers import pipeline
 | 
			
		||||
 | 
			
		||||
# Download an image with cute cats
 | 
			
		||||
>>> url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png"
 | 
			
		||||
>>> image_data = requests.get(url, stream=True).raw
 | 
			
		||||
>>> image = Image.open(image_data)
 | 
			
		||||
 | 
			
		||||
# Allocate a pipeline for object detection
 | 
			
		||||
>>> object_detector = pipeline('object-detection')
 | 
			
		||||
>>> object_detector(image)
 | 
			
		||||
[{'score': 0.9982201457023621,
 | 
			
		||||
  'label': 'remote',
 | 
			
		||||
  'box': {'xmin': 40, 'ymin': 70, 'xmax': 175, 'ymax': 117}},
 | 
			
		||||
 {'score': 0.9960021376609802,
 | 
			
		||||
  'label': 'remote',
 | 
			
		||||
  'box': {'xmin': 333, 'ymin': 72, 'xmax': 368, 'ymax': 187}},
 | 
			
		||||
 {'score': 0.9954745173454285,
 | 
			
		||||
  'label': 'couch',
 | 
			
		||||
  'box': {'xmin': 0, 'ymin': 1, 'xmax': 639, 'ymax': 473}},
 | 
			
		||||
 {'score': 0.9988006353378296,
 | 
			
		||||
  'label': 'cat',
 | 
			
		||||
  'box': {'xmin': 13, 'ymin': 52, 'xmax': 314, 'ymax': 470}},
 | 
			
		||||
 {'score': 0.9986783862113953,
 | 
			
		||||
  'label': 'cat',
 | 
			
		||||
  'box': {'xmin': 345, 'ymin': 23, 'xmax': 640, 'ymax': 368}}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
ここでは、画像から検出されたオブジェクトのリストが得られ、オブジェクトを囲むボックスと信頼度スコアが表示されます。左側が元画像、右側が予測結果を表示したものです:
 | 
			
		||||
 | 
			
		||||
<h3 align="center">
 | 
			
		||||
    <a><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png" width="400"></a>
 | 
			
		||||
    <a><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample_post_processed.png" width="400"></a>
 | 
			
		||||
</h3>
 | 
			
		||||
 | 
			
		||||
[このチュートリアル](https://huggingface.co/docs/transformers/task_summary)では、`pipeline`APIでサポートされているタスクについて詳しく説明しています。
 | 
			
		||||
 | 
			
		||||
`pipeline`に加えて、与えられたタスクに学習済みのモデルをダウンロードして使用するために必要なのは、3行のコードだけです。以下はPyTorchのバージョンです:
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModel
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
 | 
			
		||||
>>> model = AutoModel.from_pretrained("bert-base-uncased")
 | 
			
		||||
 | 
			
		||||
>>> inputs = tokenizer("Hello world!", return_tensors="pt")
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
And here is the equivalent code for TensorFlow:
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, TFAutoModel
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
 | 
			
		||||
>>> model = TFAutoModel.from_pretrained("bert-base-uncased")
 | 
			
		||||
 | 
			
		||||
>>> inputs = tokenizer("Hello world!", return_tensors="tf")
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
トークナイザは学習済みモデルが期待するすべての前処理を担当し、単一の文字列 (上記の例のように) またはリストに対して直接呼び出すことができます。これは下流のコードで使用できる辞書を出力します。また、単純に ** 引数展開演算子を使用してモデルに直接渡すこともできます。
 | 
			
		||||
 | 
			
		||||
モデル自体は通常の[Pytorch `nn.Module`](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) または [TensorFlow `tf.keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model) (バックエンドによって異なる)で、通常通り使用することが可能です。[このチュートリアル](https://huggingface.co/docs/transformers/training)では、このようなモデルを従来のPyTorchやTensorFlowの学習ループに統合する方法や、私たちの`Trainer`APIを使って新しいデータセットで素早く微調整を行う方法について説明します。
 | 
			
		||||
 | 
			
		||||
## なぜtransformersを使う必要があるのでしょうか?
 | 
			
		||||
 | 
			
		||||
1. 使いやすい最新モデル:
 | 
			
		||||
    - 自然言語理解・生成、コンピュータビジョン、オーディオの各タスクで高いパフォーマンスを発揮します。
 | 
			
		||||
    - 教育者、実務者にとっての低い参入障壁。
 | 
			
		||||
    - 学習するクラスは3つだけで、ユーザが直面する抽象化はほとんどありません。
 | 
			
		||||
    - 学習済みモデルを利用するための統一されたAPI。
 | 
			
		||||
 | 
			
		||||
1. 低い計算コスト、少ないカーボンフットプリント:
 | 
			
		||||
    - 研究者は、常に再トレーニングを行うのではなく、トレーニングされたモデルを共有することができます。
 | 
			
		||||
    - 実務家は、計算時間や生産コストを削減することができます。
 | 
			
		||||
    - すべてのモダリティにおいて、60,000以上の事前学習済みモデルを持つ数多くのアーキテクチャを提供します。
 | 
			
		||||
 | 
			
		||||
1. モデルのライフタイムのあらゆる部分で適切なフレームワークを選択可能:
 | 
			
		||||
    - 3行のコードで最先端のモデルをトレーニング。
 | 
			
		||||
    - TF2.0/PyTorch/JAXフレームワーク間で1つのモデルを自在に移動させる。
 | 
			
		||||
    - 学習、評価、生産に適したフレームワークをシームレスに選択できます。
 | 
			
		||||
 | 
			
		||||
1. モデルやサンプルをニーズに合わせて簡単にカスタマイズ可能:
 | 
			
		||||
    - 原著者が発表した結果を再現するために、各アーキテクチャの例を提供しています。
 | 
			
		||||
    - モデル内部は可能な限り一貫して公開されています。
 | 
			
		||||
    - モデルファイルはライブラリとは独立して利用することができ、迅速な実験が可能です。
 | 
			
		||||
 | 
			
		||||
## なぜtransformersを使ってはいけないのでしょうか?
 | 
			
		||||
 | 
			
		||||
- このライブラリは、ニューラルネットのためのビルディングブロックのモジュール式ツールボックスではありません。モデルファイルのコードは、研究者が追加の抽象化/ファイルに飛び込むことなく、各モデルを素早く反復できるように、意図的に追加の抽象化でリファクタリングされていません。
 | 
			
		||||
- 学習APIはどのようなモデルでも動作するわけではなく、ライブラリが提供するモデルで動作するように最適化されています。一般的な機械学習のループには、別のライブラリ(おそらく[Accelerate](https://huggingface.co/docs/accelerate))を使用する必要があります。
 | 
			
		||||
- 私たちはできるだけ多くの使用例を紹介するよう努力していますが、[examples フォルダ](https://github.com/huggingface/transformers/tree/main/examples) にあるスクリプトはあくまで例です。あなたの特定の問題に対してすぐに動作するわけではなく、あなたのニーズに合わせるために数行のコードを変更する必要があることが予想されます。
 | 
			
		||||
 | 
			
		||||
## インストール
 | 
			
		||||
 | 
			
		||||
### pipにて
 | 
			
		||||
 | 
			
		||||
このリポジトリは、Python 3.6+, Flax 0.3.2+, PyTorch 1.3.1+, TensorFlow 2.3+ でテストされています。
 | 
			
		||||
 | 
			
		||||
🤗Transformersは[仮想環境](https://docs.python.org/3/library/venv.html)にインストールする必要があります。Pythonの仮想環境に慣れていない場合は、[ユーザーガイド](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)を確認してください。
 | 
			
		||||
 | 
			
		||||
まず、使用するバージョンのPythonで仮想環境を作成し、アクティベートします。
 | 
			
		||||
 | 
			
		||||
その後、Flax, PyTorch, TensorFlowのうち少なくとも1つをインストールする必要があります。
 | 
			
		||||
[TensorFlowインストールページ](https://www.tensorflow.org/install/)、[PyTorchインストールページ](https://pytorch.org/get-started/locally/#start-locally)、[Flax](https://github.com/google/flax#quick-install)、[Jax](https://github.com/google/jax#installation)インストールページで、お使いのプラットフォーム別のインストールコマンドを参照してください。
 | 
			
		||||
 | 
			
		||||
これらのバックエンドのいずれかがインストールされている場合、🤗Transformersは以下のようにpipを使用してインストールすることができます:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
pip install transformers
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
もしサンプルを試したい、またはコードの最先端が必要で、新しいリリースを待てない場合は、[ライブラリをソースからインストール](https://huggingface.co/docs/transformers/installation#installing-from-source)する必要があります。
 | 
			
		||||
 | 
			
		||||
### condaにて
 | 
			
		||||
 | 
			
		||||
Transformersバージョン4.0.0から、condaチャンネルを搭載しました: `huggingface`。
 | 
			
		||||
 | 
			
		||||
🤗Transformersは以下のようにcondaを使って設置することができます:
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
conda install -c huggingface transformers
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Flax、PyTorch、TensorFlowをcondaでインストールする方法は、それぞれのインストールページに従ってください。
 | 
			
		||||
 | 
			
		||||
> **_注意:_**  Windowsでは、キャッシュの恩恵を受けるために、デベロッパーモードを有効にするよう促されることがあります。このような場合は、[このissue](https://github.com/huggingface/huggingface_hub/issues/1062)でお知らせください。
 | 
			
		||||
 | 
			
		||||
## モデルアーキテクチャ
 | 
			
		||||
 | 
			
		||||
🤗Transformersが提供する **[全モデルチェックポイント](https://huggingface.co/models)** は、[ユーザー](https://huggingface.co/users)や[組織](https://huggingface.co/organizations)によって直接アップロードされるhuggingface.co [model hub](https://huggingface.co)からシームレスに統合されています。
 | 
			
		||||
 | 
			
		||||
現在のチェックポイント数: 
 | 
			
		||||
 | 
			
		||||
🤗Transformersは現在、以下のアーキテクチャを提供しています(それぞれのハイレベルな要約は[こちら](https://huggingface.co/docs/transformers/model_summary)を参照してください):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (Google Research and the Toyota Technological Institute at Chicago から) Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut から公開された研究論文: [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942)
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (BAAI から) Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell から公開された研究論文: [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679)
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (MIT から) Yuan Gong, Yu-An Chung, James Glass から公開された研究論文: [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778)
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (Facebook から) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer から公開された研究論文: [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461)
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (École polytechnique から) Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis から公開された研究論文: [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321)
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (VinAI Research から) Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen から公開された研究論文: [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701)
 | 
			
		||||
1. **[BEiT](https://huggingface.co/docs/transformers/model_doc/beit)** (Microsoft から) Hangbo Bao, Li Dong, Furu Wei から公開された研究論文: [BEiT: BERT Pre-Training of Image Transformers](https://arxiv.org/abs/2106.08254)
 | 
			
		||||
1. **[BERT](https://huggingface.co/docs/transformers/model_doc/bert)** (Google から) Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova から公開された研究論文: [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805)
 | 
			
		||||
1. **[BERT For Sequence Generation](https://huggingface.co/docs/transformers/model_doc/bert-generation)** (Google から) Sascha Rothe, Shashi Narayan, Aliaksei Severyn から公開された研究論文: [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461)
 | 
			
		||||
1. **[BERTweet](https://huggingface.co/docs/transformers/model_doc/bertweet)** (VinAI Research から) Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen から公開された研究論文: [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/)
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (Google Research から) Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed から公開された研究論文: [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062)
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (Google Research から) Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed から公開された研究論文: [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062)
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (Microsoft Research AI4Science から) Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu から公開された研究論文: [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9)
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (Google AI から) Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil から公開された研究論文: [Big Transfer (BiT)](https://arxiv.org/abs/1912.11370)Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (Facebook から) Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston から公開された研究論文: [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637)
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (Facebook から) Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston から公開された研究論文: [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637)
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (Salesforce から) Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi から公開された研究論文: [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086)
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (BigScience workshop から) [BigScience Workshop](https://bigscience.huggingface.co/) から公開されました.
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (Alexa から) Adrian de Wynter and Daniel J. Perry から公開された研究論文: [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499)
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (Google Research から) Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel から公開された研究論文: [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626)
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (Inria/Facebook/Sorbonne から) Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot から公開された研究論文: [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894)
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (Google Research から) Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting から公開された研究論文: [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874)
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (OFA-Sys から) An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou から公開された研究論文: [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335)
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (OpenAI から) Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever から公開された研究論文: [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020)
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (University of Göttingen から) Timo Lüddecke and Alexander Ecker から公開された研究論文: [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003)
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (Salesforce から) Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong から公開された研究論文: [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474)
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (Microsoft Research Asia から) Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang から公開された研究論文: [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152)
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (YituTech から) Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan から公開された研究論文: [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496)
 | 
			
		||||
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (Facebook AI から) Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie から公開された研究論文: [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545)
 | 
			
		||||
1. **[CPM](https://huggingface.co/docs/transformers/model_doc/cpm)** (Tsinghua University から) Zhengyan Zhang, Xu Han, Hao Zhou, Pei Ke, Yuxian Gu, Deming Ye, Yujia Qin, Yusheng Su, Haozhe Ji, Jian Guan, Fanchao Qi, Xiaozhi Wang, Yanan Zheng, Guoyang Zeng, Huanqi Cao, Shengqi Chen, Daixuan Li, Zhenbo Sun, Zhiyuan Liu, Minlie Huang, Wentao Han, Jie Tang, Juanzi Li, Xiaoyan Zhu, Maosong Sun から公開された研究論文: [CPM: A Large-scale Generative Chinese Pre-trained Language Model](https://arxiv.org/abs/2012.00413)
 | 
			
		||||
1. **[CTRL](https://huggingface.co/docs/transformers/model_doc/ctrl)** (Salesforce から) Nitish Shirish Keskar*, Bryan McCann*, Lav R. Varshney, Caiming Xiong and Richard Socher から公開された研究論文: [CTRL: A Conditional Transformer Language Model for Controllable Generation](https://arxiv.org/abs/1909.05858)
 | 
			
		||||
1. **[CvT](https://huggingface.co/docs/transformers/model_doc/cvt)** (Microsoft から) Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, Lei Zhang から公開された研究論文: [CvT: Introducing Convolutions to Vision Transformers](https://arxiv.org/abs/2103.15808)
 | 
			
		||||
1. **[Data2Vec](https://huggingface.co/docs/transformers/model_doc/data2vec)** (Facebook から) Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu, Michael Auli から公開された研究論文: [Data2Vec:  A General Framework for Self-supervised Learning in Speech, Vision and Language](https://arxiv.org/abs/2202.03555)
 | 
			
		||||
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (Microsoft から) Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen から公開された研究論文: [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654)
 | 
			
		||||
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (Microsoft から) Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen から公開された研究論文: [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654)
 | 
			
		||||
1. **[Decision Transformer](https://huggingface.co/docs/transformers/model_doc/decision_transformer)** (Berkeley/Facebook/Google から) Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch から公開された研究論文: [Decision Transformer: Reinforcement Learning via Sequence Modeling](https://arxiv.org/abs/2106.01345)
 | 
			
		||||
1. **[Deformable DETR](https://huggingface.co/docs/transformers/model_doc/deformable_detr)** (SenseTime Research から) Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai から公開された研究論文: [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://arxiv.org/abs/2010.04159)
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (Facebook から) Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou から公開された研究論文: [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877)
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (Facebook から) Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko から公開された研究論文: [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872)
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (Microsoft Research から) Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan から公開された研究論文: [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536)
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (SHI Labs から) Ali Hassani and Humphrey Shi から公開された研究論文: [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001)
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (HuggingFace から), Victor Sanh, Lysandre Debut and Thomas Wolf. 同じ手法で GPT2, RoBERTa と Multilingual BERT の圧縮を行いました.圧縮されたモデルはそれぞれ [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation)、[DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation)、[DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) と名付けられました. 公開された研究論文: [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108)
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (Microsoft Research から) Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei から公開された研究論文: [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378)
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (NAVER から), Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park から公開された研究論文: [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664)
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (Facebook から) Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih から公開された研究論文: [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906)
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (Intel Labs から) René Ranftl, Alexey Bochkovskiy, Vladlen Koltun から公開された研究論文: [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413)
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (Snap Research から) Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren. から公開された研究論文 [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191)
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (Google Research/Stanford University から) Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning から公開された研究論文: [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555)
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (Google Research から) Sascha Rothe, Shashi Narayan, Aliaksei Severyn から公開された研究論文: [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461)
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (Baidu から) Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu から公開された研究論文: [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223)
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (Meta AI から) はトランスフォーマープロテイン言語モデルです.  **ESM-1b** は Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus から公開された研究論文: [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118). **ESM-1v** は Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives から公開された研究論文: [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648). **ESM-2** と **ESMFold** は Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives から公開された研究論文: [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) 
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (Google AI から) Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V から公開されたレポジトリー [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (CNRS から) Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab から公開された研究論文: [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372)
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (Facebook AI から) Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela から公開された研究論文: [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482)
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (Google Research から) James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon から公開された研究論文: [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824)
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (CMU/Google Brain から) Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le から公開された研究論文: [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236)
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (Microsoft Research から) Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang. から公開された研究論文 [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100)
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (KAIST から) Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim から公開された研究論文: [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436)
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (OpenAI から) Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever から公開された研究論文: [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/)
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (EleutherAI から) Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy から公開されたレポジトリー : [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo)
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (EleutherAI から) Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbach から公開された研究論文: [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745)
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (ABEJA から) Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori からリリース.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (OpenAI から) Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever** から公開された研究論文: [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/)
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (EleutherAI から) Ben Wang and Aran Komatsuzaki から公開されたレポジトリー [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) 
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (AI-Sweden から) Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren から公開された研究論文: [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) 
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (Microsoft から) Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu から公開された研究論文: [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234).
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (UCSD, NVIDIA から) Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang から公開された研究論文: [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094)
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (Facebook から) Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed から公開された研究論文: [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447)
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (Berkeley から) Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer から公開された研究論文: [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321)
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (OpenAI から) Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever から公開された研究論文: [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/)
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (OpenAI から) Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever から公開された研究論文: [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf)
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (Microsoft Research Asia から) Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou から公開された研究論文: [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318)
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (Microsoft Research Asia から) Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou から公開された研究論文: [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740)
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (Microsoft Research Asia から) Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei から公開された研究論文: [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387)
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (Microsoft Research Asia から) Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei から公開された研究論文: [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836)
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (AllenAI から) Iz Beltagy, Matthew E. Peters, Arman Cohan から公開された研究論文: [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150)
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (Meta AI から) Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze から公開された研究論文: [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136)
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (South China University of Technology から) Jiapeng Wang, Lianwen Jin, Kai Ding から公開された研究論文: [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669)
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (AllenAI から) Iz Beltagy, Matthew E. Peters, Arman Cohan から公開された研究論文: [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150)
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (Google AI から) Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang から公開された研究論文: [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916)
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (Studio Ousia から) Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto から公開された研究論文: [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057)
 | 
			
		||||
1. **[LXMERT](https://huggingface.co/docs/transformers/model_doc/lxmert)** (UNC Chapel Hill から) Hao Tan and Mohit Bansal から公開された研究論文: [LXMERT: Learning Cross-Modality Encoder Representations from Transformers for Open-Domain Question Answering](https://arxiv.org/abs/1908.07490)
 | 
			
		||||
1. **[M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)** (Facebook から) Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, and Ronan Collobert から公開された研究論文: [Pseudo-Labeling For Massively Multilingual Speech Recognition](https://arxiv.org/abs/2111.00161)
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (Facebook から) Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin から公開された研究論文: [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125)
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Jörg Tiedemann から. [OPUS](http://opus.nlpl.eu/) を使いながら学習された "Machine translation" (マシントランスレーション) モデル. [Marian Framework](https://marian-nmt.github.io/) はMicrosoft Translator Team が現在開発中です.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (Microsoft Research Asia から) Junlong Li, Yiheng Xu, Lei Cui, Furu Wei から公開された研究論文: [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518)
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (FAIR and UIUC から) Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar. から公開された研究論文 [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527)
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (Meta and UIUC から) Bowen Cheng, Alexander G. Schwing, Alexander Kirillov から公開された研究論文: [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278)
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (Facebook から) Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer から公開された研究論文: [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210)
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (Facebook から) Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan から公開された研究論文: [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401)
 | 
			
		||||
1. **[Megatron-BERT](https://huggingface.co/docs/transformers/model_doc/megatron-bert)** (NVIDIA から) Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro から公開された研究論文: [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053)
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (NVIDIA から) Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro から公開された研究論文: [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053)
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (Studio Ousia から) Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka から公開された研究論文: [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151)
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (CMU/Google Brain から) Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou から公開された研究論文: [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984)
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (Google Inc. から) Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam から公開された研究論文: [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861)
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (Google Inc. から) Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen から公開された研究論文: [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381)
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (Apple から) Sachin Mehta and Mohammad Rastegari から公開された研究論文: [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178)
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (Microsoft Research から) Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu から公開された研究論文: [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297)
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (Google AI から) Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel から公開された研究論文: [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934)
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (RUC AI Box から) Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen から公開された研究論文: [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131)
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (SHI Labs から) Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi から公開された研究論文: [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143)
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (Huawei Noah’s Ark Lab から) Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu から公開された研究論文: [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204)
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (Meta から) the NLLB team から公開された研究論文: [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672)
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (the University of Wisconsin - Madison から) Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh から公開された研究論文: [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902)
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (SHI Labs から) Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi から公開された研究論文: [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220)
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (Meta AI から) Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al から公開された研究論文: [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068)
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (Google AI から) Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby から公開された研究論文: [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230)
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (Google から) Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu から公開された研究論文: [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777)
 | 
			
		||||
1. **[PEGASUS-X](https://huggingface.co/docs/transformers/model_doc/pegasus_x)** (Google から) Jason Phang, Yao Zhao, and Peter J. Liu から公開された研究論文: [Investigating Efficiently Extending Transformers for Long Input Summarization](https://arxiv.org/abs/2208.04347)
 | 
			
		||||
1. **[Perceiver IO](https://huggingface.co/docs/transformers/model_doc/perceiver)** (Deepmind から) Andrew Jaegle, Sebastian Borgeaud, Jean-Baptiste Alayrac, Carl Doersch, Catalin Ionescu, David Ding, Skanda Koppula, Daniel Zoran, Andrew Brock, Evan Shelhamer, Olivier Hénaff, Matthew M. Botvinick, Andrew Zisserman, Oriol Vinyals, João Carreira から公開された研究論文: [Perceiver IO: A General Architecture for Structured Inputs & Outputs](https://arxiv.org/abs/2107.14795)
 | 
			
		||||
1. **[PhoBERT](https://huggingface.co/docs/transformers/model_doc/phobert)** (VinAI Research から) Dat Quoc Nguyen and Anh Tuan Nguyen から公開された研究論文: [PhoBERT: Pre-trained language models for Vietnamese](https://www.aclweb.org/anthology/2020.findings-emnlp.92/)
 | 
			
		||||
1. **[PLBart](https://huggingface.co/docs/transformers/model_doc/plbart)** (UCLA NLP から) Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang から公開された研究論文: [Unified Pre-training for Program Understanding and Generation](https://arxiv.org/abs/2103.06333)
 | 
			
		||||
1. **[PoolFormer](https://huggingface.co/docs/transformers/model_doc/poolformer)** (Sea AI Labs から) Yu, Weihao and Luo, Mi and Zhou, Pan and Si, Chenyang and Zhou, Yichen and Wang, Xinchao and Feng, Jiashi and Yan, Shuicheng から公開された研究論文: [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418)
 | 
			
		||||
1. **[ProphetNet](https://huggingface.co/docs/transformers/model_doc/prophetnet)** (Microsoft Research から) Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou から公開された研究論文: [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063)
 | 
			
		||||
1. **[QDQBert](https://huggingface.co/docs/transformers/model_doc/qdqbert)** (NVIDIA から) Hao Wu, Patrick Judd, Xiaojie Zhang, Mikhail Isaev and Paulius Micikevicius から公開された研究論文: [Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation](https://arxiv.org/abs/2004.09602)
 | 
			
		||||
1. **[RAG](https://huggingface.co/docs/transformers/model_doc/rag)** (Facebook から) Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe Kiela から公開された研究論文: [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401)
 | 
			
		||||
1. **[REALM](https://huggingface.co/docs/transformers/model_doc/realm.html)** (Google Research から) Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat and Ming-Wei Chang から公開された研究論文: [REALM: Retrieval-Augmented Language Model Pre-Training](https://arxiv.org/abs/2002.08909)
 | 
			
		||||
1. **[Reformer](https://huggingface.co/docs/transformers/model_doc/reformer)** (Google Research から) Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya から公開された研究論文: [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451)
 | 
			
		||||
1. **[RegNet](https://huggingface.co/docs/transformers/model_doc/regnet)** (META Platforms から) Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Dollár から公開された研究論文: [Designing Network Design Space](https://arxiv.org/abs/2003.13678)
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (Google Research から) Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder から公開された研究論文: [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/abs/2010.12821)
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (Microsoft Research から) Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun から公開された研究論文: [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385)
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (Facebook から), Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov から公開された研究論文: [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692)
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (Facebook から) Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli から公開された研究論文: [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038)
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (WeChatAI から) HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou から公開された研究論文: [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf)
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (ZhuiyiTechnology から), Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu から公開された研究論文: [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/abs/2104.09864)
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (NVIDIA から) Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo から公開された研究論文: [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203)
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (ASAPP から) Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi から公開された研究論文: [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870)
 | 
			
		||||
1. **[SEW-D](https://huggingface.co/docs/transformers/model_doc/sew_d)** (ASAPP から) Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi から公開された研究論文: [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870)
 | 
			
		||||
1. **[SpeechToTextTransformer](https://huggingface.co/docs/transformers/model_doc/speech_to_text)** (Facebook から), Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino から公開された研究論文: [fairseq S2T: Fast Speech-to-Text Modeling with fairseq](https://arxiv.org/abs/2010.05171)
 | 
			
		||||
1. **[SpeechToTextTransformer2](https://huggingface.co/docs/transformers/model_doc/speech_to_text_2)** (Facebook から), Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau から公開された研究論文: [Large-Scale Self- and Semi-Supervised Learning for Speech Translation](https://arxiv.org/abs/2104.06678)
 | 
			
		||||
1. **[Splinter](https://huggingface.co/docs/transformers/model_doc/splinter)** (Tel Aviv University から), Ori Ram, Yuval Kirstain, Jonathan Berant, Amir Globerson, Omer Levy から公開された研究論文: [Few-Shot Question Answering by Pretraining Span Selection](https://arxiv.org/abs/2101.00438)
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (Berkeley から) Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer から公開された研究論文: [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316)
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (Microsoft から) Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo から公開された研究論文: [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030)
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (Microsoft から) Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo から公開された研究論文: [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883)
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (University of Würzburg から) Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte から公開された研究論文: [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345)
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (Google から) William Fedus, Barret Zoph, Noam Shazeer から公開された研究論文: [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961)
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (Google AI から) Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu から公開された研究論文: [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683)
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (Google AI から) Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu から公開されたレポジトリー [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511)
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (Microsoft Research から) Brandon Smock, Rohith Pesala, Robin Abraham から公開された研究論文: [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061)
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (Google AI から) Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos から公開された研究論文: [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349)
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (Microsoft Research から) Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou から公開された研究論文: [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653)
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)**  (HuggingFace から).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (Facebook から) Gedas Bertasius, Heng Wang, Lorenzo Torresani から公開された研究論文: [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095)
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (the University of California at Berkeley から) Michael Janner, Qiyang Li, Sergey Levine から公開された研究論文: [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039)
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (Google/CMU から) Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov から公開された研究論文: [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860)
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (Microsoft から), Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei から公開された研究論文: [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282)
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (Google Research から) Yi Tay, Mostafa Dehghani, Vinh Q から公開された研究論文: [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (Microsoft Research から) Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang から公開された研究論文: [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597)
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (Microsoft Research から) Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu から公開された研究論文: [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752)
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (Peking University から) Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun. から公開された研究論文 [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221)
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (Tsinghua University and Nankai University から) Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu から公開された研究論文: [Visual Attention Network](https://arxiv.org/abs/2202.09741)
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (Multimedia Computing Group, Nanjing University から) Zhan Tong, Yibing Song, Jue Wang, Limin Wang から公開された研究論文: [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602)
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (NAVER AI Lab/Kakao Enterprise/Kakao Brain から) Wonjae Kim, Bokyung Son, Ildoo Kim から公開された研究論文: [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334)
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (Google AI から) Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby から公開された研究論文: [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929)
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (UCLA NLP から) Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang から公開された研究論文: [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557)
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (Google AI から) Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby から公開された研究論文: [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929)
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (Meta AI から) Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick から公開された研究論文: [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377)
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (Meta AI から) Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas から公開された研究論文: [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141)
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (Facebook AI から) Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli から公開された研究論文: [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477)
 | 
			
		||||
1. **[Wav2Vec2-Conformer](https://huggingface.co/docs/transformers/model_doc/wav2vec2-conformer)** (Facebook AI から) Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino から公開された研究論文: [FAIRSEQ S2T: Fast Speech-to-Text Modeling with FAIRSEQ](https://arxiv.org/abs/2010.05171)
 | 
			
		||||
1. **[Wav2Vec2Phoneme](https://huggingface.co/docs/transformers/model_doc/wav2vec2_phoneme)** (Facebook AI から) Qiantong Xu, Alexei Baevski, Michael Auli から公開された研究論文: [Simple and Effective Zero-shot Cross-lingual Phoneme Recognition](https://arxiv.org/abs/2109.11680)
 | 
			
		||||
1. **[WavLM](https://huggingface.co/docs/transformers/model_doc/wavlm)** (Microsoft Research から) Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei から公開された研究論文: [WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900)
 | 
			
		||||
1. **[Whisper](https://huggingface.co/docs/transformers/model_doc/whisper)** (OpenAI から) Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever から公開された研究論文: [Robust Speech Recognition via Large-Scale Weak Supervision](https://cdn.openai.com/papers/whisper.pdf)
 | 
			
		||||
1. **[X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)** (Microsoft Research から) Bolin Ni, Houwen Peng, Minghao Chen, Songyang Zhang, Gaofeng Meng, Jianlong Fu, Shiming Xiang, Haibin Ling から公開された研究論文: [Expanding Language-Image Pretrained Models for General Video Recognition](https://arxiv.org/abs/2208.02816)
 | 
			
		||||
1. **[XGLM](https://huggingface.co/docs/transformers/model_doc/xglm)** (From Facebook AI) Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O'Horo, Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li から公開された研究論文: [Few-shot Learning with Multilingual Language Models](https://arxiv.org/abs/2112.10668)
 | 
			
		||||
1. **[XLM](https://huggingface.co/docs/transformers/model_doc/xlm)** (Facebook から) Guillaume Lample and Alexis Conneau から公開された研究論文: [Cross-lingual Language Model Pretraining](https://arxiv.org/abs/1901.07291)
 | 
			
		||||
1. **[XLM-ProphetNet](https://huggingface.co/docs/transformers/model_doc/xlm-prophetnet)** (Microsoft Research から) Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou から公開された研究論文: [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063)
 | 
			
		||||
1. **[XLM-RoBERTa](https://huggingface.co/docs/transformers/model_doc/xlm-roberta)** (Facebook AI から), Alexis Conneau*, Kartikay Khandelwal*, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov から公開された研究論文: [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116)
 | 
			
		||||
1. **[XLM-RoBERTa-XL](https://huggingface.co/docs/transformers/model_doc/xlm-roberta-xl)** (Facebook AI から), Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau から公開された研究論文: [Larger-Scale Transformers for Multilingual Masked Language Modeling](https://arxiv.org/abs/2105.00572)
 | 
			
		||||
1. **[XLNet](https://huggingface.co/docs/transformers/model_doc/xlnet)** (Google/CMU から) Zhilin Yang*, Zihang Dai*, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le から公開された研究論文: [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237)
 | 
			
		||||
1. **[XLS-R](https://huggingface.co/docs/transformers/model_doc/xls_r)** (Facebook AI から) Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Conneau, Michael Auli から公開された研究論文: [XLS-R: Self-supervised Cross-lingual Speech Representation Learning at Scale](https://arxiv.org/abs/2111.09296)
 | 
			
		||||
1. **[XLSR-Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/xlsr_wav2vec2)** (Facebook AI から) Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, Michael Auli から公開された研究論文: [Unsupervised Cross-Lingual Representation Learning For Speech Recognition](https://arxiv.org/abs/2006.13979)
 | 
			
		||||
1. **[YOLOS](https://huggingface.co/docs/transformers/model_doc/yolos)** (Huazhong University of Science & Technology から) Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu から公開された研究論文: [You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection](https://arxiv.org/abs/2106.00666)
 | 
			
		||||
1. **[YOSO](https://huggingface.co/docs/transformers/model_doc/yoso)** (the University of Wisconsin - Madison から) Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh から公開された研究論文: [You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling](https://arxiv.org/abs/2111.09714)
 | 
			
		||||
1. 新しいモデルを投稿したいですか?新しいモデルを追加するためのガイドとして、**詳細なガイドとテンプレート**が追加されました。これらはリポジトリの[`templates`](./templates)フォルダにあります。PRを始める前に、必ず[コントリビューションガイド](./CONTRIBUTING.md)を確認し、メンテナに連絡するか、フィードバックを収集するためにissueを開いてください。
 | 
			
		||||
 | 
			
		||||
各モデルがFlax、PyTorch、TensorFlowで実装されているか、🤗Tokenizersライブラリに支えられた関連トークナイザを持っているかは、[この表](https://huggingface.co/docs/transformers/index#supported-frameworks)を参照してください。
 | 
			
		||||
 | 
			
		||||
これらの実装はいくつかのデータセットでテストされており(サンプルスクリプトを参照)、オリジナルの実装の性能と一致するはずである。性能の詳細は[documentation](https://github.com/huggingface/transformers/tree/main/examples)のExamplesセクションで見ることができます。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## さらに詳しく
 | 
			
		||||
 | 
			
		||||
| セクション | 概要 |
 | 
			
		||||
|-|-|
 | 
			
		||||
| [ドキュメント](https://huggingface.co/docs/transformers/) | 完全なAPIドキュメントとチュートリアル |
 | 
			
		||||
| [タスク概要](https://huggingface.co/docs/transformers/task_summary) | 🤗Transformersがサポートするタスク |
 | 
			
		||||
| [前処理チュートリアル](https://huggingface.co/docs/transformers/preprocessing) | モデル用のデータを準備するために`Tokenizer`クラスを使用 |
 | 
			
		||||
| [トレーニングと微調整](https://huggingface.co/docs/transformers/training) | PyTorch/TensorFlowの学習ループと`Trainer`APIで🤗Transformersが提供するモデルを使用 |
 | 
			
		||||
| [クイックツアー: 微調整/使用方法スクリプト](https://github.com/huggingface/transformers/tree/main/examples) | 様々なタスクでモデルの微調整を行うためのスクリプト例 |
 | 
			
		||||
| [モデルの共有とアップロード](https://huggingface.co/docs/transformers/model_sharing) | 微調整したモデルをアップロードしてコミュニティで共有する |
 | 
			
		||||
| [マイグレーション](https://huggingface.co/docs/transformers/migration) | `pytorch-transformers`または`pytorch-pretrained-bert`から🤗Transformers に移行する |
 | 
			
		||||
 | 
			
		||||
## 引用
 | 
			
		||||
 | 
			
		||||
🤗 トランスフォーマーライブラリに引用できる[論文](https://www.aclweb.org/anthology/2020.emnlp-demos.6/)が出来ました:
 | 
			
		||||
```bibtex
 | 
			
		||||
@inproceedings{wolf-etal-2020-transformers,
 | 
			
		||||
    title = "Transformers: State-of-the-Art Natural Language Processing",
 | 
			
		||||
    author = "Thomas Wolf and Lysandre Debut and Victor Sanh and Julien Chaumond and Clement Delangue and Anthony Moi and Pierric Cistac and Tim Rault and Rémi Louf and Morgan Funtowicz and Joe Davison and Sam Shleifer and Patrick von Platen and Clara Ma and Yacine Jernite and Julien Plu and Canwen Xu and Teven Le Scao and Sylvain Gugger and Mariama Drame and Quentin Lhoest and Alexander M. Rush",
 | 
			
		||||
    booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
 | 
			
		||||
    month = oct,
 | 
			
		||||
    year = "2020",
 | 
			
		||||
    address = "Online",
 | 
			
		||||
    publisher = "Association for Computational Linguistics",
 | 
			
		||||
    url = "https://www.aclweb.org/anthology/2020.emnlp-demos.6",
 | 
			
		||||
    pages = "38--45"
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										277
									
								
								README_ko.md
									
									
									
									
									
								
							
							
						
						
									
										277
									
								
								README_ko.md
									
									
									
									
									
								
							@ -44,7 +44,9 @@ limitations under the License.
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <b>한국어</b> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> 
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
@ -211,6 +213,8 @@ Flax, PyTorch, TensorFlow 설치 페이지에서 이들을 conda로 설치하는
 | 
			
		||||
🤗 Transformers는 다음 모델들을 제공합니다 (각 모델의 요약은 [여기](https://huggingface.co/docs/transformers/model_summary)서 확인하세요):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis.
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (from VinAI Research) released with the paper [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen.
 | 
			
		||||
@ -220,143 +224,168 @@ Flax, PyTorch, TensorFlow 설치 페이지에서 이들을 conda로 설치하는
 | 
			
		||||
1. **[BERTweet](https://huggingface.co/docs/transformers/model_doc/bertweet)** (from VinAI Research) released with the paper [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) by Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen.
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (from Google Research) released with the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) by Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (from OpenAI) released with the paper [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (from Salesforce) released with the paper [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong.
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (from Microsoft Research Asia) released with the paper [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang.
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
 | 
			
		||||
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (from Facebook AI) released with the paper [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
 | 
			
		||||
1. **[CPM](https://huggingface.co/docs/transformers/model_doc/cpm)** (from Tsinghua University) released with the paper [CPM: A Large-scale Generative Chinese Pre-trained Language Model](https://arxiv.org/abs/2012.00413) by Zhengyan Zhang, Xu Han, Hao Zhou, Pei Ke, Yuxian Gu, Deming Ye, Yujia Qin, Yusheng Su, Haozhe Ji, Jian Guan, Fanchao Qi, Xiaozhi Wang, Yanan Zheng, Guoyang Zeng, Huanqi Cao, Shengqi Chen, Daixuan Li, Zhenbo Sun, Zhiyuan Liu, Minlie Huang, Wentao Han, Jie Tang, Juanzi Li, Xiaoyan Zhu, Maosong Sun.
 | 
			
		||||
1. **[CTRL](https://huggingface.co/docs/transformers/model_doc/ctrl)** (from Salesforce) released with the paper [CTRL: A Conditional Transformer Language Model for Controllable Generation](https://arxiv.org/abs/1909.05858) by Nitish Shirish Keskar*, Bryan McCann*, Lav R. Varshney, Caiming Xiong and Richard Socher.
 | 
			
		||||
1. **[CvT](https://huggingface.co/docs/transformers/model_doc/cvt)** (from Microsoft) released with the paper [CvT: Introducing Convolutions to Vision Transformers](https://arxiv.org/abs/2103.15808) by Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, Lei Zhang.
 | 
			
		||||
1. **[Data2Vec](https://huggingface.co/docs/transformers/model_doc/data2vec)** (from Facebook) released with the paper [Data2Vec:  A General Framework for Self-supervised Learning in Speech, Vision and Language](https://arxiv.org/abs/2202.03555) by Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu, Michael Auli.
 | 
			
		||||
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.
 | 
			
		||||
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.
 | 
			
		||||
1. **[Decision Transformer](https://huggingface.co/docs/transformers/model_doc/decision_transformer)** (from Berkeley/Facebook/Google) released with the paper [Decision Transformer: Reinforcement Learning via Sequence Modeling](https://arxiv.org/abs/2106.01345) by Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch.
 | 
			
		||||
1. **[Deformable DETR](https://huggingface.co/docs/transformers/model_doc/deformable_detr)** (from SenseTime Research) released with the paper [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://arxiv.org/abs/2010.04159) by Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai.
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (from HuggingFace), released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) and a German version of DistilBERT.
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (from Microsoft Research) released with the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (from NAVER) released with the paper [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) by Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (from Facebook) released with the paper [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (from Intel Labs) released with the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (from Baidu) released with the paper [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu.
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (Alexa 에서) Adrian de Wynter and Daniel J. Perry 의 [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (Google Research 에서) Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel 의 [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (Inria/Facebook/Sorbonne 에서) Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot 의 [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (Google Research 에서) Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting 의 [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (OFA-Sys 에서) An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou 의 [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (OpenAI 에서) Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever 의 [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (University of Göttingen 에서) Timo Lüddecke and Alexander Ecker 의 [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (Salesforce 에서) Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong 의 [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (Microsoft Research Asia 에서) Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang 의 [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (YituTech 에서) Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan 의 [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (Facebook AI 에서) Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie 의 [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CPM](https://huggingface.co/docs/transformers/model_doc/cpm)** (Tsinghua University 에서) Zhengyan Zhang, Xu Han, Hao Zhou, Pei Ke, Yuxian Gu, Deming Ye, Yujia Qin, Yusheng Su, Haozhe Ji, Jian Guan, Fanchao Qi, Xiaozhi Wang, Yanan Zheng, Guoyang Zeng, Huanqi Cao, Shengqi Chen, Daixuan Li, Zhenbo Sun, Zhiyuan Liu, Minlie Huang, Wentao Han, Jie Tang, Juanzi Li, Xiaoyan Zhu, Maosong Sun 의 [CPM: A Large-scale Generative Chinese Pre-trained Language Model](https://arxiv.org/abs/2012.00413) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CTRL](https://huggingface.co/docs/transformers/model_doc/ctrl)** (Salesforce 에서) Nitish Shirish Keskar*, Bryan McCann*, Lav R. Varshney, Caiming Xiong and Richard Socher 의 [CTRL: A Conditional Transformer Language Model for Controllable Generation](https://arxiv.org/abs/1909.05858) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[CvT](https://huggingface.co/docs/transformers/model_doc/cvt)** (Microsoft 에서) Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, Lei Zhang 의 [CvT: Introducing Convolutions to Vision Transformers](https://arxiv.org/abs/2103.15808) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Data2Vec](https://huggingface.co/docs/transformers/model_doc/data2vec)** (Facebook 에서) Alexei Baevski, Wei-Ning Hsu, Qiantong Xu, Arun Babu, Jiatao Gu, Michael Auli 의 [Data2Vec:  A General Framework for Self-supervised Learning in Speech, Vision and Language](https://arxiv.org/abs/2202.03555) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (Microsoft 에서) Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen 의 [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (Microsoft 에서) Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen 의 [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Decision Transformer](https://huggingface.co/docs/transformers/model_doc/decision_transformer)** (Berkeley/Facebook/Google 에서) Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch 의 [Decision Transformer: Reinforcement Learning via Sequence Modeling](https://arxiv.org/abs/2106.01345) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Deformable DETR](https://huggingface.co/docs/transformers/model_doc/deformable_detr)** (SenseTime Research 에서) Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai 의 [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://arxiv.org/abs/2010.04159) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (Facebook 에서) Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou 의 [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (Facebook 에서) Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko 의 [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (Microsoft Research 에서) Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan 의 [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (SHI Labs 에서) Ali Hassani and Humphrey Shi 의 [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (HuggingFace 에서) Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) and a German version of DistilBERT 의 [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (Microsoft Research 에서) Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei 의 [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (NAVER 에서) Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park 의 [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (Facebook 에서) Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih 의 [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (Intel Labs 에서) René Ranftl, Alexey Bochkovskiy, Vladlen Koltun 의 [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (Google Research/Stanford University 에서) Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning 의 [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (Google Research 에서) Sascha Rothe, Shashi Narayan, Aliaksei Severyn 의 [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (Baidu 에서) Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu 의 [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (from OpenAI) released with the paper [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever.
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (from EleutherAI) released in the repository [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) by Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy.
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (from EleutherAI) released with the paper [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745) by Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbach
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (EleutherAI 에서) Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbac 의 [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (from ABEJA) released by Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (from OpenAI) released with the paper [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) by Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever**.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (from UCSD, NVIDIA) released with the paper [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (from Facebook) released with the paper [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed.
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (from Berkeley) released with the paper [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) by Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer.
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (from Microsoft Research Asia) released with the paper [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (from Microsoft Research Asia) released with the paper [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) by Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (from Meta AI) released with the paper [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/main/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (from Google AI) released with the paper [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang.
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (from Studio Ousia) released with the paper [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) by Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto.
 | 
			
		||||
1. **[LXMERT](https://huggingface.co/docs/transformers/model_doc/lxmert)** (from UNC Chapel Hill) released with the paper [LXMERT: Learning Cross-Modality Encoder Representations from Transformers for Open-Domain Question Answering](https://arxiv.org/abs/1908.07490) by Hao Tan and Mohit Bansal.
 | 
			
		||||
1. **[M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)** (from Facebook) released with the paper [Pseudo-Labeling For Massively Multilingual Speech Recognition](https://arxiv.org/abs/2111.00161) by Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, and Ronan Collobert.
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (OpenAI 에서) Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever** 의 [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki. 
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (AI-Sweden 에서) Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren. 의 [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (from Microsoft) Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu  의 [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234)  논문과 함께 발표했습니다.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (UCSD, NVIDIA 에서) Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang 의 [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (Facebook 에서) Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed 의 [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (Berkeley 에서) Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer 의 [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (OpenAI 에서) Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever 의 [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (OpenAI 에서) Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever 의 [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (Microsoft Research Asia 에서) Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou 의 [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (Microsoft Research Asia 에서) Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou 의 [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (Microsoft Research Asia 에서) Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei 의 [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (Microsoft Research Asia 에서) Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei 의 [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (AllenAI 에서) Iz Beltagy, Matthew E. Peters, Arman Cohan 의 [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (Meta AI 에서) Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze 의 [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (South China University of Technology 에서) Jiapeng Wang, Lianwen Jin, Kai Ding 의 [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (AllenAI 에서) Iz Beltagy, Matthew E. Peters, Arman Cohan 의 [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (Google AI 에서) Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang 의 [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (Studio Ousia 에서) Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto 의 [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[LXMERT](https://huggingface.co/docs/transformers/model_doc/lxmert)** (UNC Chapel Hill 에서) Hao Tan and Mohit Bansal 의 [LXMERT: Learning Cross-Modality Encoder Representations from Transformers for Open-Domain Question Answering](https://arxiv.org/abs/1908.07490) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)** (Facebook 에서) Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, and Ronan Collobert 의 [Pseudo-Labeling For Massively Multilingual Speech Recognition](https://arxiv.org/abs/2111.00161) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (Facebook 에서) Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin 의 [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (from Microsoft Research Asia) released with the paper [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei.
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov.
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
1. **[Megatron-BERT](https://huggingface.co/docs/transformers/model_doc/megatron-bert)** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (from Studio Ousia) released with the paper [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka.
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (from CMU/Google Brain) released with the paper [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (from Apple) released with the paper [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari.
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (from Google AI) released with the paper [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel.
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
1. **[PEGASUS-X](https://huggingface.co/docs/transformers/model_doc/pegasus_x)** (from Google) released with the paper [Investigating Efficiently Extending Transformers for Long Input Summarization](https://arxiv.org/abs/2208.04347) by Jason Phang, Yao Zhao, Peter J. Liu.
 | 
			
		||||
1. **[Perceiver IO](https://huggingface.co/docs/transformers/model_doc/perceiver)** (from Deepmind) released with the paper [Perceiver IO: A General Architecture for Structured Inputs & Outputs](https://arxiv.org/abs/2107.14795) by Andrew Jaegle, Sebastian Borgeaud, Jean-Baptiste Alayrac, Carl Doersch, Catalin Ionescu, David Ding, Skanda Koppula, Daniel Zoran, Andrew Brock, Evan Shelhamer, Olivier Hénaff, Matthew M. Botvinick, Andrew Zisserman, Oriol Vinyals, João Carreira.
 | 
			
		||||
1. **[PhoBERT](https://huggingface.co/docs/transformers/model_doc/phobert)** (from VinAI Research) released with the paper [PhoBERT: Pre-trained language models for Vietnamese](https://www.aclweb.org/anthology/2020.findings-emnlp.92/) by Dat Quoc Nguyen and Anh Tuan Nguyen.
 | 
			
		||||
1. **[PLBart](https://huggingface.co/docs/transformers/model_doc/plbart)** (from UCLA NLP) released with the paper [Unified Pre-training for Program Understanding and Generation](https://arxiv.org/abs/2103.06333) by Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang.
 | 
			
		||||
1. **[PoolFormer](https://huggingface.co/docs/transformers/model_doc/poolformer)** (from Sea AI Labs) released with the paper [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418) by Yu, Weihao and Luo, Mi and Zhou, Pan and Si, Chenyang and Zhou, Yichen and Wang, Xinchao and Feng, Jiashi and Yan, Shuicheng.
 | 
			
		||||
1. **[ProphetNet](https://huggingface.co/docs/transformers/model_doc/prophetnet)** (from Microsoft Research) released with the paper [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063) by Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou.
 | 
			
		||||
1. **[QDQBert](https://huggingface.co/docs/transformers/model_doc/qdqbert)** (from NVIDIA) released with the paper [Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation](https://arxiv.org/abs/2004.09602) by Hao Wu, Patrick Judd, Xiaojie Zhang, Mikhail Isaev and Paulius Micikevicius.
 | 
			
		||||
1. **[RAG](https://huggingface.co/docs/transformers/model_doc/rag)** (from Facebook) released with the paper [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401) by Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe Kiela.
 | 
			
		||||
1. **[REALM](https://huggingface.co/docs/transformers/model_doc/realm.html)** (from Google Research) released with the paper [REALM: Retrieval-Augmented Language Model Pre-Training](https://arxiv.org/abs/2002.08909) by Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat and Ming-Wei Chang.
 | 
			
		||||
1. **[Reformer](https://huggingface.co/docs/transformers/model_doc/reformer)** (from Google Research) released with the paper [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451) by Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya.
 | 
			
		||||
1. **[RegNet](https://huggingface.co/docs/transformers/model_doc/regnet)** (from META Research) released with the paper [Designing Network Design Space](https://arxiv.org/abs/2003.13678) by Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Dollár.
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (from Google Research) released with the paper [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/pdf/2010.12821.pdf) by Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder.
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (from Facebook), released together with the paper a [Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (from ZhuiyiTechnology), released together with the paper a [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/pdf/2104.09864v1.pdf) by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu.
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
1. **[SEW-D](https://huggingface.co/docs/transformers/model_doc/sew_d)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
1. **[SpeechToTextTransformer](https://huggingface.co/docs/transformers/model_doc/speech_to_text)** (from Facebook), released together with the paper [fairseq S2T: Fast Speech-to-Text Modeling with fairseq](https://arxiv.org/abs/2010.05171) by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino.
 | 
			
		||||
1. **[SpeechToTextTransformer2](https://huggingface.co/docs/transformers/model_doc/speech_to_text_2)** (from Facebook), released together with the paper [Large-Scale Self- and Semi-Supervised Learning for Speech Translation](https://arxiv.org/abs/2104.06678) by Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau.
 | 
			
		||||
1. **[Splinter](https://huggingface.co/docs/transformers/model_doc/splinter)** (from Tel Aviv University), released together with the paper [Few-Shot Question Answering by Pretraining Span Selection](https://arxiv.org/abs/2101.00438) by Ori Ram, Yuval Kirstain, Jonathan Berant, Amir Globerson, Omer Levy.
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (from Berkeley) released with the paper [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer.
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (from Microsoft) released with the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) by Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo.
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (from Microsoft) released with the paper [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (from Google AI) released with the paper [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (Microsoft Research Asia 에서) Junlong Li, Yiheng Xu, Lei Cui, Furu Wei 의 [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (FAIR and UIUC 에서 제공)은 Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.의 [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527)논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (Meta and UIUC 에서) Bowen Cheng, Alexander G. Schwing, Alexander Kirillov 의 [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (Facebook 에서) Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer 의 [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (Facebook 에서) Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan 의 [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Megatron-BERT](https://huggingface.co/docs/transformers/model_doc/megatron-bert)** (NVIDIA 에서) Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro 의 [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (NVIDIA 에서) Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro 의 [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (Studio Ousia 에서) Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka 의 [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (CMU/Google Brain 에서) Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou 의 [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (Google Inc. 에서) Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam 의 [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (Google Inc. 에서) Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen 의 [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (Apple 에서) Sachin Mehta and Mohammad Rastegari 의 [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (Microsoft Research 에서) Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu 의 [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (Google AI 에서) Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel 의 [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (RUC AI Box 에서) Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen 의 [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (SHI Labs 에서) Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi 의 [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (Huawei Noah’s Ark Lab 에서) Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu 의 [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (Meta 에서) the NLLB team 의 [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (the University of Wisconsin - Madison 에서) Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh 의 [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (SHI Labs 에서) Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi 의 [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (Meta AI 에서) Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al 의 [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (Google AI 에서) Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby 의 [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (Google 에서) Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu 의 [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[PEGASUS-X](https://huggingface.co/docs/transformers/model_doc/pegasus_x)** (Google 에서) Jason Phang, Yao Zhao, Peter J. Liu 의 [Investigating Efficiently Extending Transformers for Long Input Summarization](https://arxiv.org/abs/2208.04347) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Perceiver IO](https://huggingface.co/docs/transformers/model_doc/perceiver)** (Deepmind 에서) Andrew Jaegle, Sebastian Borgeaud, Jean-Baptiste Alayrac, Carl Doersch, Catalin Ionescu, David Ding, Skanda Koppula, Daniel Zoran, Andrew Brock, Evan Shelhamer, Olivier Hénaff, Matthew M. Botvinick, Andrew Zisserman, Oriol Vinyals, João Carreira 의 [Perceiver IO: A General Architecture for Structured Inputs & Outputs](https://arxiv.org/abs/2107.14795) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[PhoBERT](https://huggingface.co/docs/transformers/model_doc/phobert)** (VinAI Research 에서) Dat Quoc Nguyen and Anh Tuan Nguyen 의 [PhoBERT: Pre-trained language models for Vietnamese](https://www.aclweb.org/anthology/2020.findings-emnlp.92/) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[PLBart](https://huggingface.co/docs/transformers/model_doc/plbart)** (UCLA NLP 에서) Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang 의 [Unified Pre-training for Program Understanding and Generation](https://arxiv.org/abs/2103.06333) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[PoolFormer](https://huggingface.co/docs/transformers/model_doc/poolformer)** (Sea AI Labs 에서) Yu, Weihao and Luo, Mi and Zhou, Pan and Si, Chenyang and Zhou, Yichen and Wang, Xinchao and Feng, Jiashi and Yan, Shuicheng 의 [MetaFormer is Actually What You Need for Vision](https://arxiv.org/abs/2111.11418) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ProphetNet](https://huggingface.co/docs/transformers/model_doc/prophetnet)** (Microsoft Research 에서) Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou 의 [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[QDQBert](https://huggingface.co/docs/transformers/model_doc/qdqbert)** (NVIDIA 에서) Hao Wu, Patrick Judd, Xiaojie Zhang, Mikhail Isaev and Paulius Micikevicius 의 [Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation](https://arxiv.org/abs/2004.09602) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RAG](https://huggingface.co/docs/transformers/model_doc/rag)** (Facebook 에서) Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe Kiela 의 [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[REALM](https://huggingface.co/docs/transformers/model_doc/realm.html)** (Google Research 에서) Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat and Ming-Wei Chang 의 [REALM: Retrieval-Augmented Language Model Pre-Training](https://arxiv.org/abs/2002.08909) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Reformer](https://huggingface.co/docs/transformers/model_doc/reformer)** (Google Research 에서) Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya 의 [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RegNet](https://huggingface.co/docs/transformers/model_doc/regnet)** (META Research 에서) Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Dollár 의 [Designing Network Design Space](https://arxiv.org/abs/2003.13678) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (Google Research 에서) Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder 의 [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/pdf/2010.12821.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (Microsoft Research 에서) Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun 의 [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (Facebook 에서) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov 의 a [Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (Facebook 에서) Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli 의 [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (WeChatAI 에서) HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou 의 [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (ZhuiyiTechnology 에서) Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu 의 a [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/pdf/2104.09864v1.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (NVIDIA 에서) Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo 의 [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (ASAPP 에서) Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi 의 [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SEW-D](https://huggingface.co/docs/transformers/model_doc/sew_d)** (ASAPP 에서) Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi 의 [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SpeechToTextTransformer](https://huggingface.co/docs/transformers/model_doc/speech_to_text)** (Facebook 에서) Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino 의 [fairseq S2T: Fast Speech-to-Text Modeling with fairseq](https://arxiv.org/abs/2010.05171) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SpeechToTextTransformer2](https://huggingface.co/docs/transformers/model_doc/speech_to_text_2)** (Facebook 에서) Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau 의 [Large-Scale Self- and Semi-Supervised Learning for Speech Translation](https://arxiv.org/abs/2104.06678) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Splinter](https://huggingface.co/docs/transformers/model_doc/splinter)** (Tel Aviv University 에서) Ori Ram, Yuval Kirstain, Jonathan Berant, Amir Globerson, Omer Levy 의 [Few-Shot Question Answering by Pretraining Span Selection](https://arxiv.org/abs/2101.00438) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (Berkeley 에서) Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer 의 [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (Microsoft 에서) Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo 의 [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (Microsoft 에서) Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo 의 [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (University of Würzburg 에서) Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte 의 [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (Google 에서) William Fedus, Barret Zoph, Noam Shazeer. 의 [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (Google AI 에서) Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu 의 [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (from Google AI) released in the repository [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (from Google AI) released with the paper [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) by Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos.
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (from Microsoft Research) released with the paper [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) by Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou.
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (Microsoft Research 에서) Brandon Smock, Rohith Pesala, Robin Abraham 의 [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (Google AI 에서) Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos 의 [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (Microsoft Research 에서) Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou 의 [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (from Google/CMU) released with the paper [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov.
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (from Microsoft), released together with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (from Microsoft Research) released with the paper [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang.
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (from Microsoft Research) released with the paper [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (from Tsinghua University and Nankai University) released with the paper [Visual Attention Network](https://arxiv.org/pdf/2202.09741.pdf) by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu.
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (from Multimedia Computing Group, Nanjing University) released with the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (from NAVER AI Lab/Kakao Enterprise/Kakao Brain) released with the paper [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) by Wonjae Kim, Bokyung Son, Ildoo Kim.
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (from UCLA NLP) released with the paper [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) by Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (from Meta AI) released with the paper [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick.
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (from Meta AI) released with the paper [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (from Facebook AI) released with the paper [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
1. **[Wav2Vec2-Conformer](https://huggingface.co/docs/transformers/model_doc/wav2vec2-conformer)** (from Facebook AI) released with the paper [FAIRSEQ S2T: Fast Speech-to-Text Modeling with FAIRSEQ](https://arxiv.org/abs/2010.05171) by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino.
 | 
			
		||||
1. **[Wav2Vec2Phoneme](https://huggingface.co/docs/transformers/model_doc/wav2vec2_phoneme)** (from Facebook AI) released with the paper [Simple and Effective Zero-shot Cross-lingual Phoneme Recognition](https://arxiv.org/abs/2109.11680) by Qiantong Xu, Alexei Baevski, Michael Auli.
 | 
			
		||||
1. **[WavLM](https://huggingface.co/docs/transformers/model_doc/wavlm)** (from Microsoft Research) released with the paper [WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900) by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei.
 | 
			
		||||
1. **[Whisper](https://huggingface.co/docs/transformers/model_doc/whisper)** (from OpenAI) released with the paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://cdn.openai.com/papers/whisper.pdf) by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever.
 | 
			
		||||
1. **[X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)** (from Microsoft Research) released with the paper [Expanding Language-Image Pretrained Models for General Video Recognition](https://arxiv.org/abs/2208.02816) by Bolin Ni, Houwen Peng, Minghao Chen, Songyang Zhang, Gaofeng Meng, Jianlong Fu, Shiming Xiang, Haibin Ling.
 | 
			
		||||
1. **[XGLM](https://huggingface.co/docs/transformers/model_doc/xglm)** (From Facebook AI) released with the paper [Few-shot Learning with Multilingual Language Models](https://arxiv.org/abs/2112.10668) by Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O'Horo, Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li.
 | 
			
		||||
1. **[XLM](https://huggingface.co/docs/transformers/model_doc/xlm)** (from Facebook) released together with the paper [Cross-lingual Language Model Pretraining](https://arxiv.org/abs/1901.07291) by Guillaume Lample and Alexis Conneau.
 | 
			
		||||
1. **[XLM-ProphetNet](https://huggingface.co/docs/transformers/model_doc/xlm-prophetnet)** (from Microsoft Research) released with the paper [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063) by Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou.
 | 
			
		||||
1. **[XLM-RoBERTa](https://huggingface.co/docs/transformers/model_doc/xlm-roberta)** (from Facebook AI), released together with the paper [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Alexis Conneau*, Kartikay Khandelwal*, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov.
 | 
			
		||||
1. **[XLM-RoBERTa-XL](https://huggingface.co/docs/transformers/model_doc/xlm-roberta-xl)** (from Facebook AI) released with the paper [Larger-Scale Transformers for Multilingual Masked Language Modeling](https://arxiv.org/abs/2105.00572) by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau.
 | 
			
		||||
1. **[XLNet](https://huggingface.co/docs/transformers/model_doc/xlnet)** (from Google/CMU) released with the paper [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237) by Zhilin Yang*, Zihang Dai*, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le.
 | 
			
		||||
1. **[XLS-R](https://huggingface.co/docs/transformers/model_doc/xls_r)** (from Facebook AI) released with the paper [XLS-R: Self-supervised Cross-lingual Speech Representation Learning at Scale](https://arxiv.org/abs/2111.09296) by Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Conneau, Michael Auli.
 | 
			
		||||
1. **[XLSR-Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/xlsr_wav2vec2)** (from Facebook AI) released with the paper [Unsupervised Cross-Lingual Representation Learning For Speech Recognition](https://arxiv.org/abs/2006.13979) by Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
1. **[YOLOS](https://huggingface.co/docs/transformers/model_doc/yolos)** (from Huazhong University of Science & Technology) released with the paper [You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection](https://arxiv.org/abs/2106.00666) by Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu.
 | 
			
		||||
1. **[YOSO](https://huggingface.co/docs/transformers/model_doc/yoso)** (from the University of Wisconsin - Madison) released with the paper [You Only Sample (Almost) by Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh.
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (Facebook 에서) Gedas Bertasius, Heng Wang, Lorenzo Torresani 의 [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (the University of California at Berkeley 에서) Michael Janner, Qiyang Li, Sergey Levin 의 [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (Google/CMU 에서) Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov 의 [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (Microsoft 에서) Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei 의 [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (Google Research 에서) Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzle 의 [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (Microsoft Research 에서) Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang 의 [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (Microsoft Research 에서) Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu 의 [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (Peking University 에서 제공)은 Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.의 [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221)논문과 함께 발표했습니다.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (Tsinghua University and Nankai University 에서) Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu 의 [Visual Attention Network](https://arxiv.org/pdf/2202.09741.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (Multimedia Computing Group, Nanjing University 에서) Zhan Tong, Yibing Song, Jue Wang, Limin Wang 의 [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (NAVER AI Lab/Kakao Enterprise/Kakao Brain 에서) Wonjae Kim, Bokyung Son, Ildoo Kim 의 [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (Google AI 에서) Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby 의 [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (UCLA NLP 에서) Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang 의 [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (Google AI 에서) Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby 의 [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (Meta AI 에서) Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick 의 [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (Meta AI 에서) Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas 의 [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (Facebook AI 에서) Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli 의 [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Wav2Vec2-Conformer](https://huggingface.co/docs/transformers/model_doc/wav2vec2-conformer)** (Facebook AI 에서) Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino 의 [FAIRSEQ S2T: Fast Speech-to-Text Modeling with FAIRSEQ](https://arxiv.org/abs/2010.05171) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Wav2Vec2Phoneme](https://huggingface.co/docs/transformers/model_doc/wav2vec2_phoneme)** (Facebook AI 에서) Qiantong Xu, Alexei Baevski, Michael Auli 의 [Simple and Effective Zero-shot Cross-lingual Phoneme Recognition](https://arxiv.org/abs/2109.11680) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[WavLM](https://huggingface.co/docs/transformers/model_doc/wavlm)** (Microsoft Research 에서) Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei 의 [WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[Whisper](https://huggingface.co/docs/transformers/model_doc/whisper)** (OpenAI 에서) Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever 의 [Robust Speech Recognition via Large-Scale Weak Supervision](https://cdn.openai.com/papers/whisper.pdf) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)** (Microsoft Research 에서) Bolin Ni, Houwen Peng, Minghao Chen, Songyang Zhang, Gaofeng Meng, Jianlong Fu, Shiming Xiang, Haibin Ling 의 [Expanding Language-Image Pretrained Models for General Video Recognition](https://arxiv.org/abs/2208.02816) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XGLM](https://huggingface.co/docs/transformers/model_doc/xglm)** (Facebook AI 에서 제공) Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal, Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O'Horo, Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li 의 [Few-shot Learning with Multilingual Language Models](https://arxiv.org/abs/2112.10668) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLM](https://huggingface.co/docs/transformers/model_doc/xlm)** (Facebook 에서) Guillaume Lample and Alexis Conneau 의 [Cross-lingual Language Model Pretraining](https://arxiv.org/abs/1901.07291) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLM-ProphetNet](https://huggingface.co/docs/transformers/model_doc/xlm-prophetnet)** (Microsoft Research 에서) Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou 의 [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLM-RoBERTa](https://huggingface.co/docs/transformers/model_doc/xlm-roberta)** (Facebook AI 에서) Alexis Conneau*, Kartikay Khandelwal*, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov 의 [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLM-RoBERTa-XL](https://huggingface.co/docs/transformers/model_doc/xlm-roberta-xl)** (Facebook AI 에서) Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau 의 [Larger-Scale Transformers for Multilingual Masked Language Modeling](https://arxiv.org/abs/2105.00572) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLNet](https://huggingface.co/docs/transformers/model_doc/xlnet)** (Google/CMU 에서) Zhilin Yang*, Zihang Dai*, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le 의 [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLS-R](https://huggingface.co/docs/transformers/model_doc/xls_r)** (Facebook AI 에서) Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakhotia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Conneau, Michael Auli 의 [XLS-R: Self-supervised Cross-lingual Speech Representation Learning at Scale](https://arxiv.org/abs/2111.09296) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[XLSR-Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/xlsr_wav2vec2)** (Facebook AI 에서) Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, Michael Auli 의 [Unsupervised Cross-Lingual Representation Learning For Speech Recognition](https://arxiv.org/abs/2006.13979) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[YOLOS](https://huggingface.co/docs/transformers/model_doc/yolos)** (Huazhong University of Science & Technology 에서) Yuxin Fang, Bencheng Liao, Xinggang Wang, Jiemin Fang, Jiyang Qi, Rui Wu, Jianwei Niu, Wenyu Liu 의 [You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection](https://arxiv.org/abs/2106.00666) 논문과 함께 발표했습니다.
 | 
			
		||||
1. **[YOSO](https://huggingface.co/docs/transformers/model_doc/yoso)** (the University of Wisconsin - Madison 에서) Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh 의 [You Only Sample (Almost) 논문과 함께 발표했습니다.
 | 
			
		||||
1. 새로운 모델을 올리고 싶나요? 우리가 **상세한 가이드와 템플릿** 으로 새로운 모델을 올리도록 도와드릴게요. 가이드와 템플릿은 이 저장소의 [`templates`](./templates) 폴더에서 확인하실 수 있습니다. [컨트리뷰션 가이드라인](./CONTRIBUTING.md)을 꼭 확인해주시고, PR을 올리기 전에 메인테이너에게 연락하거나 이슈를 오픈해 피드백을 받으시길 바랍니다.
 | 
			
		||||
 | 
			
		||||
각 모델이 Flax, PyTorch, TensorFlow으로 구현되었는지 또는 🤗 Tokenizers 라이브러리가 지원하는 토크나이저를 사용하는지 확인하려면, [이 표](https://huggingface.co/docs/transformers/index#supported-frameworks)를 확인하세요.
 | 
			
		||||
 | 
			
		||||
@ -69,7 +69,9 @@ checkpoint: 检查点
 | 
			
		||||
        <b>简体中文</b> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hant.md">繁體中文</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> 
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
@ -235,6 +237,8 @@ conda install -c huggingface transformers
 | 
			
		||||
🤗 Transformers 目前支持如下的架构(模型概述请阅[这里](https://huggingface.co/docs/transformers/model_summary)):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (来自 Google Research and the Toyota Technological Institute at Chicago) 伴随论文 [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), 由 Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut 发布。
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (来自 BAAI) 伴随论文 [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) 由 Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell 发布。
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (来自 MIT) 伴随论文 [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) 由 Yuan Gong, Yu-An Chung, James Glass 发布。
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (来自 Facebook) 伴随论文 [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) 由 Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer 发布。
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (来自 École polytechnique) 伴随论文 [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) 由 Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis 发布。
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (来自 VinAI Research) 伴随论文 [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) 由 Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen 发布。
 | 
			
		||||
@ -244,14 +248,19 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[BERTweet](https://huggingface.co/docs/transformers/model_doc/bertweet)** (来自 VinAI Research) 伴随论文 [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) 由 Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen 发布。
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (来自 Google Research) 伴随论文 [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) 由 Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed 发布。
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (来自 Google Research) 伴随论文 [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) 由 Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed 发布。
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (来自 Microsoft Research AI4Science) 伴随论文 [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) 由 Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu 发布。
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (来自 Google AI) 伴随论文 [Big Transfer (BiT) 由 Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby 发布。
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (来自 Facebook) 伴随论文 [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) 由 Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston 发布。
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (来自 Facebook) 伴随论文 [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) 由 Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston 发布。
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (来自 Salesforce) 伴随论文 [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) 由 Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi 发布。
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (来自 Alexa) 伴随论文 [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) 由 Adrian de Wynter and Daniel J. Perry 发布。
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (来自 Google Research) 伴随论文 [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) 由 Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel 发布。
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (来自 Inria/Facebook/Sorbonne) 伴随论文 [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) 由 Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot 发布。
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (来自 Google Research) 伴随论文 [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) 由 Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting 发布。
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (来自 OFA-Sys) 伴随论文 [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) 由 An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou 发布。
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (来自 OpenAI) 伴随论文 [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) 由 Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever 发布。
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (来自 University of Göttingen) 伴随论文 [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) 由 Timo Lüddecke and Alexander Ecker 发布。
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (来自 Salesforce) 伴随论文 [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) 由 Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong 发布。
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (来自 Microsoft Research Asia) 伴随论文 [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) 由 Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang 发布。
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (来自 YituTech) 伴随论文 [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) 由 Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan 发布。
 | 
			
		||||
@ -267,37 +276,44 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (来自 Facebook) 伴随论文 [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) 由 Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou 发布。
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (来自 Facebook) 伴随论文 [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) 由 Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko 发布。
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (来自 Microsoft Research) 伴随论文 [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) 由 Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan 发布。
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (来自 SHI Labs) 伴随论文 [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) 由 Ali Hassani and Humphrey Shi 发布。
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (来自 HuggingFace), 伴随论文 [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) 由 Victor Sanh, Lysandre Debut and Thomas Wolf 发布。 同样的方法也应用于压缩 GPT-2 到 [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa 到 [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation), Multilingual BERT 到 [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) 和德语版 DistilBERT。
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (来自 Microsoft Research) 伴随论文 [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) 由 Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei 发布。
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (来自 NAVER) 伴随论文 [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) 由 Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park 发布。
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (来自 Facebook) 伴随论文 [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) 由 Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih 发布。
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (来自 Intel Labs) 伴随论文 [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) 由 René Ranftl, Alexey Bochkovskiy, Vladlen Koltun 发布。
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (来自 Snap Research) 伴随论文 [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) 由 Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren 发布。
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (来自 Google Research/Stanford University) 伴随论文 [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) 由 Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning 发布。
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (来自 Google Research) 伴随论文 [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) 由 Sascha Rothe, Shashi Narayan, Aliaksei Severyn 发布。
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (来自 Baidu) 伴随论文 [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu 发布。
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (来自 CNRS) 伴随论文 [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) 由 Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab 发布。
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (来自 Facebook AI) 伴随论文 [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) 由 Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela 发布。
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (来自 Google Research) 伴随论文 [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) 由 James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon 发布。
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (来自 CMU/Google Brain) 伴随论文 [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) 由 Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le 发布。
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (来自 Microsoft Research) 伴随论文 [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) 由 Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang 发布。
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (来自 KAIST) 伴随论文 [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) 由 Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim 发布。
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (来自 OpenAI) 伴随论文 [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) 由 Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever 发布。
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (来自 EleutherAI) 随仓库 [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) 发布。作者为 Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy 发布。
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (from EleutherAI) released with the paper [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745) by Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbach
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (来自 ABEJA) 由 Shinya Otani, Takayoshi Makabe, Anuj Arora, Kyo Hattori。
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (来自 OpenAI) 伴随论文 [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) 由 Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever** 发布。
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (来自 EleutherAI) 伴随论文 [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) 由 Ben Wang and Aran Komatsuzaki 发布。
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (来自 EleutherAI) 伴随论文 [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) 由 Ben Wang and Aran Komatsuzaki 发布。 
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren. 
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (来自 UCSD, NVIDIA) 伴随论文 [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) 由 Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang 发布。
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (来自 Facebook) 伴随论文 [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) 由 Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed 发布。
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (来自 Berkeley) 伴随论文 [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) 由 Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer 发布。
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (来自 OpenAI) 伴随论文 [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) 由 Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever 发布。
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (来自 Microsoft Research Asia) 伴随论文 [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) 由 Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou 发布。
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (来自 Microsoft Research Asia) 伴随论文 [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) 由 Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou 发布。
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (来自 Microsoft Research Asia) 伴随论文 [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) 由 Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei 发布。
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (来自 Microsoft Research Asia) 伴随论文 [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) 由 Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei 发布。
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (来自 AllenAI) 伴随论文 [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) 由 Iz Beltagy, Matthew E. Peters, Arman Cohan 发布。
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (来自 Meta AI) 伴随论文 [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) 由 Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze 发布。
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/main/model_doc/lilt)** (来自 South China University of Technology) 伴随论文 [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) 由 Jiapeng Wang, Lianwen Jin, Kai Ding 发布。
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (来自 South China University of Technology) 伴随论文 [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) 由 Jiapeng Wang, Lianwen Jin, Kai Ding 发布。
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (来自 AllenAI) 伴随论文 [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) 由 Iz Beltagy, Matthew E. Peters, Arman Cohan 发布。
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (来自 Google AI) released 伴随论文 [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) 由 Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang 发布。
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (来自 Studio Ousia) 伴随论文 [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) 由 Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto 发布。
 | 
			
		||||
@ -306,6 +322,7 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (来自 Facebook) 伴随论文 [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) 由 Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin 发布。
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** 用 [OPUS](http://opus.nlpl.eu/) 数据训练的机器翻译模型由 Jörg Tiedemann 发布。[Marian Framework](https://marian-nmt.github.io/) 由微软翻译团队开发。
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (来自 Microsoft Research Asia) 伴随论文 [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) 由 Junlong Li, Yiheng Xu, Lei Cui, Furu Wei 发布。
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (来自 FAIR and UIUC) 伴随论文 [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) 由 Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar 发布。
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov  >>>>>>> Fix rebase
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (来自 Facebook) 伴随论文 [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) 由 Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer 发布。
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (来自 Facebook) 伴随论文 [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) 由 Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan 发布。
 | 
			
		||||
@ -313,13 +330,17 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (来自 NVIDIA) 伴随论文 [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) 由 Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro 发布。
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (来自 Studio Ousia) 伴随论文 [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) 由 Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka 发布。
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (来自 CMU/Google Brain) 伴随论文 [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) 由 Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou 发布。
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (来自 Google Inc.) 伴随论文 [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) 由 Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam 发布。
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (来自 Google Inc.) 伴随论文 [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) 由 Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen 发布。
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (来自 Apple) 伴随论文 [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) 由 Sachin Mehta and Mohammad Rastegari 发布。
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (来自 Microsoft Research) 伴随论文 [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) 由 Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu 发布。
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (来自 Google AI) 伴随论文 [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) 由 Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel 发布。
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (来自 中国人民大学 AI Box) 伴随论文 [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) 由 Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen 发布。
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (来自 SHI Labs) 伴随论文 [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) 由 Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi 发布。
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (来自华为诺亚方舟实验室) 伴随论文 [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) 由 Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu 发布。
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (来自 Meta) 伴随论文 [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) 由 the NLLB team 发布。
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (来自 the University of Wisconsin - Madison) 伴随论文 [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) 由 Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh 发布。
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (来自 SHI Labs)  伴随论文 [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) 由 Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi 发布。
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (来自 Meta AI) 伴随论文 [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) 由 Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al 发布。
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (来自 Google AI) 伴随论文 [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) 由 Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby 发布。
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (来自 Google) 伴随论文 [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) 由 Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu 发布。
 | 
			
		||||
@ -337,6 +358,8 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (来自 Google Research) 伴随论文 [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/pdf/2010.12821.pdf) 由 Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder 发布。
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (来自 Facebook), 伴随论文 [Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) 由 Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov 发布。
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (来自 Facebook) 伴随论文 [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) 由 Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli 发布。
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (来自 WeChatAI), 伴随论文 [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) 由 HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou 发布。
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (来自 ZhuiyiTechnology), 伴随论文 [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/pdf/2104.09864v1.pdf) 由 Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu 发布。
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (来自 NVIDIA) 伴随论文 [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) 由 Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo 发布。
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (来自 ASAPP) 伴随论文 [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) 由 Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi 发布。
 | 
			
		||||
@ -347,22 +370,28 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (来自 Berkeley) 伴随论文 [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) 由 Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer 发布。
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (来自 Microsoft) 伴随论文 [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) 由 Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo 发布。
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (来自 Microsoft) 伴随论文 [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) 由 Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo 发布。
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (来自 University of Würzburg) 伴随论文 [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) 由 Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte 发布。
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer. 
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (来自 Google AI) 伴随论文 [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) 由 Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu 发布。
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (来自 Google AI) 伴随论文 [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) 由 Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu 发布。
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (来自 Microsoft Research) 伴随论文 [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) 由 Brandon Smock, Rohith Pesala, Robin Abraham 发布。
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (来自 Google AI) 伴随论文 [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) 由 Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos 发布。
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (来自 Microsoft Research) 伴随论文 [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) 由 Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou 发布。
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (来自 Google/CMU) 伴随论文 [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) 由 Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov 发布。
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (来自 Microsoft) 伴随论文 [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) 由 Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei 发布。
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (来自 Microsoft Research) 伴随论文 [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) 由 Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang 发布。
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (来自 Microsoft Research) 伴随论文 [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) 由 Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu 发布。
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (来自 Peking University) 伴随论文 [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) 由 Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun 发布。
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (来自 Tsinghua University and Nankai University) 伴随论文 [Visual Attention Network](https://arxiv.org/pdf/2202.09741.pdf) 由 Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu 发布。
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (来自 Multimedia Computing Group, Nanjing University) 伴随论文 [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) 由 Zhan Tong, Yibing Song, Jue Wang, Limin Wang 发布。
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (来自 NAVER AI Lab/Kakao Enterprise/Kakao Brain) 伴随论文 [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) 由 Wonjae Kim, Bokyung Son, Ildoo Kim 发布。
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (来自 Google AI) 伴随论文 [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) 由 Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby 发布。
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (来自 UCLA NLP) 伴随论文 [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) 由 Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang 发布。
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (来自 Google AI) 伴随论文 [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) 由 Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby 发布。
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (来自 Meta AI) 伴随论文 [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) 由 Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick 发布。
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (来自 Meta AI) 伴随论文 [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas 发布.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (来自 Facebook AI) 伴随论文 [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) 由 Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli 发布。
 | 
			
		||||
 | 
			
		||||
@ -81,7 +81,9 @@ user: 使用者
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_zh-hans.md">简体中文</a> |
 | 
			
		||||
        <b>繁體中文</b> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ko.md">한국어</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> 
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_es.md">Español</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_ja.md">日本語</a> |
 | 
			
		||||
        <a href="https://github.com/huggingface/transformers/blob/main/README_hd.md">हिन्दी</a>
 | 
			
		||||
    <p>
 | 
			
		||||
</h4>
 | 
			
		||||
 | 
			
		||||
@ -247,6 +249,8 @@ conda install -c huggingface transformers
 | 
			
		||||
🤗 Transformers 目前支援以下的架構(模型概覽請參閱[這裡](https://huggingface.co/docs/transformers/model_summary)):
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](https://huggingface.co/docs/transformers/model_doc/albert)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.
 | 
			
		||||
1. **[AltCLIP](https://huggingface.co/docs/transformers/main/model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](https://huggingface.co/docs/transformers/model_doc/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
 | 
			
		||||
1. **[BARThez](https://huggingface.co/docs/transformers/model_doc/barthez)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis.
 | 
			
		||||
1. **[BARTpho](https://huggingface.co/docs/transformers/model_doc/bartpho)** (from VinAI Research) released with the paper [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen.
 | 
			
		||||
@ -256,14 +260,19 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[BERTweet](https://huggingface.co/docs/transformers/model_doc/bertweet)** (from VinAI Research) released with the paper [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) by Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen.
 | 
			
		||||
1. **[BigBird-Pegasus](https://huggingface.co/docs/transformers/model_doc/bigbird_pegasus)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BigBird-RoBERTa](https://huggingface.co/docs/transformers/model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BioGpt](https://huggingface.co/docs/transformers/main/model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](https://huggingface.co/docs/transformers/main/model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](https://huggingface.co/docs/transformers/model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](https://huggingface.co/docs/transformers/model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLIP](https://huggingface.co/docs/transformers/main/model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](https://huggingface.co/docs/transformers/model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](https://huggingface.co/docs/transformers/model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](https://huggingface.co/docs/transformers/model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](https://huggingface.co/docs/transformers/model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
1. **[CANINE](https://huggingface.co/docs/transformers/model_doc/canine)** (from Google Research) released with the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) by Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting.
 | 
			
		||||
1. **[Chinese-CLIP](https://huggingface.co/docs/transformers/model_doc/chinese_clip)** (from OFA-Sys) released with the paper [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
1. **[CLIP](https://huggingface.co/docs/transformers/model_doc/clip)** (from OpenAI) released with the paper [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever.
 | 
			
		||||
1. **[CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)** (from University of Göttingen) released with the paper [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke and Alexander Ecker.
 | 
			
		||||
1. **[CodeGen](https://huggingface.co/docs/transformers/model_doc/codegen)** (from Salesforce) released with the paper [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong.
 | 
			
		||||
1. **[Conditional DETR](https://huggingface.co/docs/transformers/model_doc/conditional_detr)** (from Microsoft Research Asia) released with the paper [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang.
 | 
			
		||||
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
 | 
			
		||||
@ -279,37 +288,44 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
 | 
			
		||||
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
 | 
			
		||||
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
 | 
			
		||||
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
 | 
			
		||||
1. **[DistilBERT](https://huggingface.co/docs/transformers/model_doc/distilbert)** (from HuggingFace), released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) and a German version of DistilBERT.
 | 
			
		||||
1. **[DiT](https://huggingface.co/docs/transformers/model_doc/dit)** (from Microsoft Research) released with the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[Donut](https://huggingface.co/docs/transformers/model_doc/donut)** (from NAVER) released with the paper [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) by Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
 | 
			
		||||
1. **[DPR](https://huggingface.co/docs/transformers/model_doc/dpr)** (from Facebook) released with the paper [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
 | 
			
		||||
1. **[DPT](https://huggingface.co/docs/transformers/master/model_doc/dpt)** (from Intel Labs) released with the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
 | 
			
		||||
1. **[EfficientFormer](https://huggingface.co/docs/transformers/main/model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](https://huggingface.co/docs/transformers/model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
 | 
			
		||||
1. **[EncoderDecoder](https://huggingface.co/docs/transformers/model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
 | 
			
		||||
1. **[ERNIE](https://huggingface.co/docs/transformers/model_doc/ernie)** (from Baidu) released with the paper [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu.
 | 
			
		||||
1. **[ESM](https://huggingface.co/docs/transformers/model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](https://huggingface.co/docs/transformers/model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](https://huggingface.co/docs/transformers/model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
 | 
			
		||||
1. **[FLAVA](https://huggingface.co/docs/transformers/model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
 | 
			
		||||
1. **[FNet](https://huggingface.co/docs/transformers/model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
 | 
			
		||||
1. **[Funnel Transformer](https://huggingface.co/docs/transformers/model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
 | 
			
		||||
1. **[GIT](https://huggingface.co/docs/transformers/main/model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](https://huggingface.co/docs/transformers/model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
 | 
			
		||||
1. **[GPT](https://huggingface.co/docs/transformers/model_doc/openai-gpt)** (from OpenAI) released with the paper [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever.
 | 
			
		||||
1. **[GPT Neo](https://huggingface.co/docs/transformers/model_doc/gpt_neo)** (from EleutherAI) released in the repository [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) by Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy.
 | 
			
		||||
1. **[GPT NeoX](https://huggingface.co/docs/transformers/model_doc/gpt_neox)** (from EleutherAI) released with the paper [GPT-NeoX-20B: An Open-Source Autoregressive Language Model](https://arxiv.org/abs/2204.06745) by Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, Samuel Weinbach
 | 
			
		||||
1. **[GPT NeoX Japanese](https://huggingface.co/docs/transformers/model_doc/gpt_neox_japanese)** (from ABEJA) released by Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori.
 | 
			
		||||
1. **[GPT-2](https://huggingface.co/docs/transformers/model_doc/gpt2)** (from OpenAI) released with the paper [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) by Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever**.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released with the paper [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki.
 | 
			
		||||
1. **[GPT-J](https://huggingface.co/docs/transformers/model_doc/gptj)** (from EleutherAI) released with the paper [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki. 
 | 
			
		||||
1. **[GPT-Sw3](https://huggingface.co/docs/transformers/main/model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren. 
 | 
			
		||||
1. **[Graphormer](https://huggingface.co/docs/transformers/main/model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](https://huggingface.co/docs/transformers/model_doc/groupvit)** (from UCSD, NVIDIA) released with the paper [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
 | 
			
		||||
1. **[Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)** (from Facebook) released with the paper [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed.
 | 
			
		||||
1. **[I-BERT](https://huggingface.co/docs/transformers/model_doc/ibert)** (from Berkeley) released with the paper [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) by Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer.
 | 
			
		||||
1. **[ImageGPT](https://huggingface.co/docs/transformers/model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[Jukebox](https://huggingface.co/docs/transformers/model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](https://huggingface.co/docs/transformers/model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](https://huggingface.co/docs/transformers/model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3)** (from Microsoft Research Asia) released with the paper [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
 | 
			
		||||
1. **[LayoutXLM](https://huggingface.co/docs/transformers/model_doc/layoutxlm)** (from Microsoft Research Asia) released with the paper [LayoutXLM: Multimodal Pre-training for Multilingual Visually-rich Document Understanding](https://arxiv.org/abs/2104.08836) by Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[LED](https://huggingface.co/docs/transformers/model_doc/led)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LeViT](https://huggingface.co/docs/transformers/model_doc/levit)** (from Meta AI) released with the paper [LeViT: A Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/main/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[LiLT](https://huggingface.co/docs/transformers/model_doc/lilt)** (from South China University of Technology) released with the paper [LiLT: A Simple yet Effective Language-Independent Layout Transformer for Structured Document Understanding](https://arxiv.org/abs/2202.13669) by Jiapeng Wang, Lianwen Jin, Kai Ding.
 | 
			
		||||
1. **[Longformer](https://huggingface.co/docs/transformers/model_doc/longformer)** (from AllenAI) released with the paper [Longformer: The Long-Document Transformer](https://arxiv.org/abs/2004.05150) by Iz Beltagy, Matthew E. Peters, Arman Cohan.
 | 
			
		||||
1. **[LongT5](https://huggingface.co/docs/transformers/model_doc/longt5)** (from Google AI) released with the paper [LongT5: Efficient Text-To-Text Transformer for Long Sequences](https://arxiv.org/abs/2112.07916) by Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, Yinfei Yang.
 | 
			
		||||
1. **[LUKE](https://huggingface.co/docs/transformers/model_doc/luke)** (from Studio Ousia) released with the paper [LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention](https://arxiv.org/abs/2010.01057) by Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, Yuji Matsumoto.
 | 
			
		||||
@ -318,6 +334,7 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[M2M100](https://huggingface.co/docs/transformers/model_doc/m2m_100)** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[MarkupLM](https://huggingface.co/docs/transformers/model_doc/markuplm)** (from Microsoft Research Asia) released with the paper [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei.
 | 
			
		||||
1. **[Mask2Former](https://huggingface.co/docs/transformers/main/model_doc/mask2former)** (from FAIR and UIUC) released with the paper [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.
 | 
			
		||||
1. **[MaskFormer](https://huggingface.co/docs/transformers/model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov
 | 
			
		||||
1. **[mBART](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](https://huggingface.co/docs/transformers/model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
@ -325,13 +342,17 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[mLUKE](https://huggingface.co/docs/transformers/model_doc/mluke)** (from Studio Ousia) released with the paper [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka.
 | 
			
		||||
1. **[MobileBERT](https://huggingface.co/docs/transformers/model_doc/mobilebert)** (from CMU/Google Brain) released with the paper [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou.
 | 
			
		||||
1. **[MobileNetV1](https://huggingface.co/docs/transformers/model_doc/mobilenet_v1)** (from Google Inc.) released with the paper [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam.
 | 
			
		||||
1. **[MobileNetV2](https://huggingface.co/docs/transformers/model_doc/mobilenet_v2)** (from Google Inc.) released with the paper [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.
 | 
			
		||||
1. **[MobileViT](https://huggingface.co/docs/transformers/model_doc/mobilevit)** (from Apple) released with the paper [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari.
 | 
			
		||||
1. **[MPNet](https://huggingface.co/docs/transformers/model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](https://huggingface.co/docs/transformers/model_doc/mt5)** (from Google AI) released with the paper [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel.
 | 
			
		||||
1. **[MVP](https://huggingface.co/docs/transformers/model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[NAT](https://huggingface.co/docs/transformers/model_doc/nat)** (from SHI Labs) released with the paper [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.
 | 
			
		||||
1. **[Nezha](https://huggingface.co/docs/transformers/model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](https://huggingface.co/docs/transformers/model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](https://huggingface.co/docs/transformers/model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OneFormer](https://huggingface.co/docs/transformers/main/model_doc/oneformer)** (from SHI Labs) released with the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi.
 | 
			
		||||
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](https://huggingface.co/docs/transformers/model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
@ -349,6 +370,8 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[RemBERT](https://huggingface.co/docs/transformers/model_doc/rembert)** (from Google Research) released with the paper [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/pdf/2010.12821.pdf) by Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder.
 | 
			
		||||
1. **[ResNet](https://huggingface.co/docs/transformers/model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)** (from Facebook), released together with the paper a [Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov.
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](https://huggingface.co/docs/transformers/main/model_doc/roberta-prelayernorm)** (from Facebook) released with the paper [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
 | 
			
		||||
1. **[RoCBert](https://huggingface.co/docs/transformers/main/model_doc/roc_bert)** (from WeChatAI) released with the paper [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) by HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou.
 | 
			
		||||
1. **[RoFormer](https://huggingface.co/docs/transformers/model_doc/roformer)** (from ZhuiyiTechnology), released together with the paper a [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/pdf/2104.09864v1.pdf) by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu.
 | 
			
		||||
1. **[SegFormer](https://huggingface.co/docs/transformers/model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](https://huggingface.co/docs/transformers/model_doc/sew)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
@ -359,22 +382,28 @@ conda install -c huggingface transformers
 | 
			
		||||
1. **[SqueezeBERT](https://huggingface.co/docs/transformers/model_doc/squeezebert)** (from Berkeley) released with the paper [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer.
 | 
			
		||||
1. **[Swin Transformer](https://huggingface.co/docs/transformers/model_doc/swin)** (from Microsoft) released with the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) by Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo.
 | 
			
		||||
1. **[Swin Transformer V2](https://huggingface.co/docs/transformers/model_doc/swinv2)** (from Microsoft) released with the paper [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
 | 
			
		||||
1. **[Swin2SR](https://huggingface.co/docs/transformers/main/model_doc/swin2sr)** (from University of Würzburg) released with the paper [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) by Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte.
 | 
			
		||||
1. **[SwitchTransformers](https://huggingface.co/docs/transformers/main/model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer. 
 | 
			
		||||
1. **[T5](https://huggingface.co/docs/transformers/model_doc/t5)** (from Google AI) released with the paper [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[T5v1.1](https://huggingface.co/docs/transformers/model_doc/t5v1.1)** (from Google AI) released with the paper [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[Table Transformer](https://huggingface.co/docs/transformers/model_doc/table-transformer)** (from Microsoft Research) released with the paper [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) by Brandon Smock, Rohith Pesala, Robin Abraham.
 | 
			
		||||
1. **[TAPAS](https://huggingface.co/docs/transformers/model_doc/tapas)** (from Google AI) released with the paper [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) by Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos.
 | 
			
		||||
1. **[TAPEX](https://huggingface.co/docs/transformers/model_doc/tapex)** (from Microsoft Research) released with the paper [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) by Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou.
 | 
			
		||||
1. **[Time Series Transformer](https://huggingface.co/docs/transformers/model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](https://huggingface.co/docs/transformers/main/model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](https://huggingface.co/docs/transformers/model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](https://huggingface.co/docs/transformers/model_doc/transfo-xl)** (from Google/CMU) released with the paper [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov.
 | 
			
		||||
1. **[TrOCR](https://huggingface.co/docs/transformers/model_doc/trocr)** (from Microsoft) released with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](https://huggingface.co/docs/transformers/model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](https://huggingface.co/docs/transformers/model_doc/unispeech)** (from Microsoft Research) released with the paper [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang.
 | 
			
		||||
1. **[UniSpeechSat](https://huggingface.co/docs/transformers/model_doc/unispeech-sat)** (from Microsoft Research) released with the paper [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu.
 | 
			
		||||
1. **[UPerNet](https://huggingface.co/docs/transformers/main/model_doc/upernet)** (from Peking University) released with the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.
 | 
			
		||||
1. **[VAN](https://huggingface.co/docs/transformers/model_doc/van)** (from Tsinghua University and Nankai University) released with the paper [Visual Attention Network](https://arxiv.org/pdf/2202.09741.pdf) by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu.
 | 
			
		||||
1. **[VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)** (from Multimedia Computing Group, Nanjing University) released with the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
 | 
			
		||||
1. **[ViLT](https://huggingface.co/docs/transformers/model_doc/vilt)** (from NAVER AI Lab/Kakao Enterprise/Kakao Brain) released with the paper [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) by Wonjae Kim, Bokyung Son, Ildoo Kim.
 | 
			
		||||
1. **[Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[VisualBERT](https://huggingface.co/docs/transformers/model_doc/visual_bert)** (from UCLA NLP) released with the paper [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) by Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang.
 | 
			
		||||
1. **[ViT Hybrid](https://huggingface.co/docs/transformers/main/model_doc/vit_hybrid)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[ViTMAE](https://huggingface.co/docs/transformers/model_doc/vit_mae)** (from Meta AI) released with the paper [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick.
 | 
			
		||||
1. **[ViTMSN](https://huggingface.co/docs/transformers/model_doc/vit_msn)** (from Meta AI) released with the paper [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas.
 | 
			
		||||
1. **[Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)** (from Facebook AI) released with the paper [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
 | 
			
		||||
FROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04
 | 
			
		||||
LABEL maintainer="Hugging Face"
 | 
			
		||||
 | 
			
		||||
ARG DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
@ -9,11 +9,11 @@ SHELL ["sh", "-lc"]
 | 
			
		||||
# The following `ARG` are mainly used to specify the versions explicitly & directly in this docker file, and not meant
 | 
			
		||||
# to be used as arguments for docker build (so far).
 | 
			
		||||
 | 
			
		||||
ARG PYTORCH='1.12.1'
 | 
			
		||||
ARG PYTORCH='1.13.0'
 | 
			
		||||
# (not always a valid torch version)
 | 
			
		||||
ARG INTEL_TORCH_EXT='1.11.0'
 | 
			
		||||
# Example: `cu102`, `cu113`, etc.
 | 
			
		||||
ARG CUDA='cu113'
 | 
			
		||||
ARG CUDA='cu116'
 | 
			
		||||
 | 
			
		||||
RUN apt update
 | 
			
		||||
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg git-lfs
 | 
			
		||||
@ -32,16 +32,18 @@ RUN echo torch=$VERSION
 | 
			
		||||
# TODO: We might need to specify proper versions that work with a specific torch version (especially for past CI).
 | 
			
		||||
RUN [ "$PYTORCH" != "pre" ] && python3 -m pip install --no-cache-dir -U $VERSION torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA || python3 -m pip install --no-cache-dir -U --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/$CUDA
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -U tensorflow
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -U tensorflow==2.11
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -U tensorflow_probability
 | 
			
		||||
RUN python3 -m pip uninstall -y flax jax
 | 
			
		||||
 | 
			
		||||
# Use installed torch version for `torch-scatter` to avid to deal with PYTORCH='pre'.
 | 
			
		||||
# If torch is nightly version, the link is likely to be invalid, but the installation falls back to the latest torch-scatter
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+$CUDA.html
 | 
			
		||||
# To include the change in this commit https://github.com/onnx/tensorflow-onnx/commit/ddca3a5eb2d912f20fe7e0568dd1a3013aee9fa3
 | 
			
		||||
# Otherwise, we get tf2onnx==1.8 (caused by `flatbuffers` version),  and some tests fail with `ValueError: from_keras requires input_signature`.
 | 
			
		||||
# TODO: remove this line once the conflict is resolved in these libraries.
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/onnx/tensorflow-onnx.git@ddca3a5eb2d912f20fe7e0568dd1a3013aee9fa3
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT+cpu -f https://software.intel.com/ipex-whl-stable
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract
 | 
			
		||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
 | 
			
		||||
@ -51,6 +53,9 @@ RUN python3 -m pip install --no-cache-dir bitsandbytes
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir decord
 | 
			
		||||
 | 
			
		||||
# For `dinat` model
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir natten -f https://shi-labs.com/natten/wheels/$CUDA/
 | 
			
		||||
 | 
			
		||||
# When installing in editable mode, `transformers` is not recognized as a package.
 | 
			
		||||
# this line must be added in order for python to be aware of transformers.
 | 
			
		||||
RUN cd transformers && python3 setup.py develop
 | 
			
		||||
 | 
			
		||||
@ -10,8 +10,7 @@ RUN apt-get -y update && apt-get install -y libsndfile1-dev && apt install -y te
 | 
			
		||||
# Torch needs to be installed before deepspeed
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir ./transformers[deepspeed]
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python -c "from torch import version; print(version.__version__.split('+')[0])")+cpu.html
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir torchvision git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir torchvision git+https://github.com/facebookresearch/detectron2.git pytesseract
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com
 | 
			
		||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -34,10 +34,4 @@ RUN python3 ./transformers/utils/past_ci_versions.py --framework $FRAMEWORK --ve
 | 
			
		||||
RUN echo "INSTALL_CMD = $INSTALL_CMD"
 | 
			
		||||
RUN $INSTALL_CMD
 | 
			
		||||
 | 
			
		||||
# Having installation problems for torch-scatter with torch <= 1.6. Disable so we have the same set of tests.
 | 
			
		||||
# (This part will be removed once the logic of using `past_ci_versions.py` is used in other Dockerfile files.)
 | 
			
		||||
# # Use installed torch version for `torch-scatter`.
 | 
			
		||||
# # (The env. variable $CUDA is defined in `past_ci_versions.py`)
 | 
			
		||||
# RUN [ "$FRAMEWORK" = "pytorch" ] && python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+$CUDA.html || echo "torch-scatter not to be installed"
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,12 @@
 | 
			
		||||
FROM nvcr.io/nvidia/pytorch:21.03-py3
 | 
			
		||||
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_22-04.html#rel_22-04
 | 
			
		||||
FROM nvcr.io/nvidia/pytorch:22.04-py3
 | 
			
		||||
LABEL maintainer="Hugging Face"
 | 
			
		||||
 | 
			
		||||
ARG DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
 | 
			
		||||
ARG PYTORCH='1.12.1'
 | 
			
		||||
ARG PYTORCH='1.13.0'
 | 
			
		||||
# Example: `cu102`, `cu113`, etc.
 | 
			
		||||
ARG CUDA='cu113'
 | 
			
		||||
ARG CUDA='cu116'
 | 
			
		||||
 | 
			
		||||
RUN apt -y update
 | 
			
		||||
RUN apt install -y libaio-dev
 | 
			
		||||
@ -21,6 +22,14 @@ RUN python3 -m pip install --no-cache-dir -U torch==$PYTORCH torchvision torchau
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir ./transformers[deepspeed-testing]
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install torch-tensorrt==1.3.0 --find-links https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.3.0
 | 
			
		||||
 | 
			
		||||
# recompile apex
 | 
			
		||||
RUN python3 -m pip uninstall -y apex
 | 
			
		||||
RUN git clone https://github.com/NVIDIA/apex
 | 
			
		||||
#  `MAX_JOBS=1` disables parallel building to avoid cpu memory OOM when building image on GitHub Action (standard) runners
 | 
			
		||||
RUN cd apex && MAX_JOBS=1 python3 -m pip install --global-option="--cpp_ext" --global-option="--cuda_ext" --no-cache -v --disable-pip-version-check .
 | 
			
		||||
 | 
			
		||||
# Pre-build **latest** DeepSpeed, so it would be ready for testing (otherwise, the 1st deepspeed test will timeout)
 | 
			
		||||
RUN python3 -m pip uninstall -y deepspeed
 | 
			
		||||
# This has to be run (again) inside the GPU VMs running the tests.
 | 
			
		||||
@ -32,4 +41,6 @@ RUN DS_BUILD_CPU_ADAM=1 DS_BUILD_FUSED_ADAM=1 DS_BUILD_AIO=1 DS_BUILD_UTILS=1 py
 | 
			
		||||
# this line must be added in order for python to be aware of transformers.
 | 
			
		||||
RUN cd transformers && python3 setup.py develop
 | 
			
		||||
 | 
			
		||||
# The base image ships with `pydantic==1.8.2` which is not working - i.e. the next command fails
 | 
			
		||||
RUN python3 -m pip install -U --no-cache-dir pydantic
 | 
			
		||||
RUN python3 -c "from deepspeed.launcher.runner import main"
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
 | 
			
		||||
FROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04
 | 
			
		||||
LABEL maintainer="Hugging Face"
 | 
			
		||||
 | 
			
		||||
ARG DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
@ -9,21 +9,22 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip
 | 
			
		||||
 | 
			
		||||
ARG REF=main
 | 
			
		||||
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing]
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
 | 
			
		||||
 | 
			
		||||
# If set to nothing, will install the latest version
 | 
			
		||||
ARG PYTORCH='1.12.1'
 | 
			
		||||
ARG PYTORCH='1.13.0'
 | 
			
		||||
ARG TORCH_VISION=''
 | 
			
		||||
ARG TORCH_AUDIO=''
 | 
			
		||||
# Example: `cu102`, `cu113`, etc.
 | 
			
		||||
ARG CUDA='cu116'
 | 
			
		||||
 | 
			
		||||
RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' ||  VERSION='torch'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113
 | 
			
		||||
RUN [ ${#TORCH_VISION} -gt 0 ] && VERSION='torchvision=='TORCH_VISION'.*' ||  VERSION='torchvision'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113
 | 
			
		||||
RUN [ ${#TORCH_AUDIO} -gt 0 ] && VERSION='torchaudio=='TORCH_AUDIO'.*' ||  VERSION='torchaudio'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113
 | 
			
		||||
RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' ||  VERSION='torch'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 | 
			
		||||
RUN [ ${#TORCH_VISION} -gt 0 ] && VERSION='torchvision=='TORCH_VISION'.*' ||  VERSION='torchvision'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 | 
			
		||||
RUN [ ${#TORCH_AUDIO} -gt 0 ] && VERSION='torchaudio=='TORCH_AUDIO'.*' ||  VERSION='torchaudio'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip uninstall -y tensorflow flax
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+cu113.html
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract
 | 
			
		||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
 | 
			
		||||
 | 
			
		||||
# When installing in editable mode, `transformers` is not recognized as a package.
 | 
			
		||||
 | 
			
		||||
@ -12,12 +12,14 @@ RUN git clone https://github.com/huggingface/transformers && cd transformers &&
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-tensorflow,testing]
 | 
			
		||||
 | 
			
		||||
# If set to nothing, will install the latest version
 | 
			
		||||
ARG TENSORFLOW=''
 | 
			
		||||
ARG TENSORFLOW='2.11'
 | 
			
		||||
 | 
			
		||||
RUN [ ${#TENSORFLOW} -gt 0 ] && VERSION='tensorflow=='$TENSORFLOW'.*' ||  VERSION='tensorflow'; python3 -m pip install --no-cache-dir -U $VERSION
 | 
			
		||||
RUN python3 -m pip uninstall -y torch flax
 | 
			
		||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install --no-cache-dir -U tensorflow_probability
 | 
			
		||||
 | 
			
		||||
# When installing in editable mode, `transformers` is not recognized as a package.
 | 
			
		||||
# this line must be added in order for python to be aware of transformers.
 | 
			
		||||
RUN cd transformers && python3 setup.py develop
 | 
			
		||||
 | 
			
		||||
@ -90,7 +90,7 @@ the filename without the extension in the [`_toctree.yml`](https://github.com/hu
 | 
			
		||||
 | 
			
		||||
It helps to keep the old links working when renaming the section header and/or moving sections from one document to another. This is because the old links are likely to be used in Issues, Forums, and Social media and it'd make for a much more superior user experience if users reading those months later could still easily navigate to the originally intended information.
 | 
			
		||||
 | 
			
		||||
Therefore we simply keep a little map of moved sections at the end of the document where the original section was. The key is to preserve the original anchor.
 | 
			
		||||
Therefore, we simply keep a little map of moved sections at the end of the document where the original section was. The key is to preserve the original anchor.
 | 
			
		||||
 | 
			
		||||
So if you renamed a section from: "Section A" to "Section B", then you can add at the end of the file:
 | 
			
		||||
 | 
			
		||||
@ -354,7 +354,7 @@ The docstring should give a minimal, clear example of how the respective model
 | 
			
		||||
is to be used in inference and also include the expected (ideally sensible)
 | 
			
		||||
output.
 | 
			
		||||
Often, readers will try out the example before even going through the function 
 | 
			
		||||
or class definitions. Therefore it is of utmost importance that the example 
 | 
			
		||||
or class definitions. Therefore, it is of utmost importance that the example 
 | 
			
		||||
works as expected.
 | 
			
		||||
 | 
			
		||||
## Docstring testing
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
# docstyle-ignore
 | 
			
		||||
INSTALL_CONTENT = """
 | 
			
		||||
# Transformers installation
 | 
			
		||||
! pip install transformers datasets
 | 
			
		||||
! pip install transformers datasets evaluate
 | 
			
		||||
# To install from source instead of the last release, comment the command above and uncomment the following one.
 | 
			
		||||
# ! pip install git+https://github.com/huggingface/transformers.git
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
@ -28,8 +28,8 @@ Jede 🤗 Transformers-Architektur ist in einem eigenständigen Python-Modul def
 | 
			
		||||
## Wenn Sie auf der Suche nach individueller Unterstützung durch das Hugging Face-Team sind
 | 
			
		||||
 | 
			
		||||
<a target="_blank" href="https://huggingface.co/support">
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a><br>
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="width: 100%; max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
## Inhalt
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,7 @@ Die Bibliothek enthält derzeit JAX-, PyTorch- und TensorFlow-Implementierungen,
 | 
			
		||||
1. **[BigBird-RoBERTa](model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[Blenderbot](model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLOOM](model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
@ -115,6 +115,7 @@ Die Bibliothek enthält derzeit JAX-, PyTorch- und TensorFlow-Implementierungen,
 | 
			
		||||
1. **[M-CTC-T](model_doc/mctct)** (from Facebook) released with the paper [Pseudo-Labeling For Massively Multilingual Speech Recognition](https://arxiv.org/abs/2111.00161) by Loren Lugosch, Tatiana Likhomanenko, Gabriel Synnaeve, and Ronan Collobert.
 | 
			
		||||
1. **[M2M100](model_doc/m2m_100)** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[MarianMT](model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[Mask2Former](model_doc/mask2former)** (from FAIR and UIUC) released with the paper [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.
 | 
			
		||||
1. **[MaskFormer](model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov.
 | 
			
		||||
1. **[mBART](model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
@ -129,6 +130,7 @@ Die Bibliothek enthält derzeit JAX-, PyTorch- und TensorFlow-Implementierungen,
 | 
			
		||||
1. **[Nezha](model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OneFormer](model_doc/oneformer)** (from SHI Labs) released with the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi.
 | 
			
		||||
1. **[OPT](master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,7 @@ Wenn Sie mehr als eine Eingabe haben, übergeben Sie die Eingabe als Liste:
 | 
			
		||||
... )  # doctest: +SKIP
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Alle zusätzlichen Parameter für Ihre Aufgabe können auch in die [`pipeline`] aufgenommen werden. Die Aufgabe `Text-Generierung` hat eine [`~generation_utils.GenerationMixin.generate`]-Methode mit mehreren Parametern zur Steuerung der Ausgabe. Wenn Sie zum Beispiel mehr als eine Ausgabe erzeugen wollen, setzen Sie den Parameter `num_return_sequences`:
 | 
			
		||||
Alle zusätzlichen Parameter für Ihre Aufgabe können auch in die [`pipeline`] aufgenommen werden. Die Aufgabe `Text-Generierung` hat eine [`~generation.GenerationMixin.generate`]-Methode mit mehreren Parametern zur Steuerung der Ausgabe. Wenn Sie zum Beispiel mehr als eine Ausgabe erzeugen wollen, setzen Sie den Parameter `num_return_sequences`:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> generator(
 | 
			
		||||
 | 
			
		||||
@ -185,6 +185,8 @@ from transformers import AutoTokenizer
 | 
			
		||||
 | 
			
		||||
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
 | 
			
		||||
tokenized_data = tokenizer(dataset["text"], return_tensors="np", padding=True)
 | 
			
		||||
# Tokenizer returns a BatchEncoding, but we convert that to a dict for Keras
 | 
			
		||||
tokenized_data = dict(tokenized_data)
 | 
			
		||||
 | 
			
		||||
labels = np.array(dataset["label"])  # Label is already an array of 0 and 1
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										73
									
								
								docs/source/en/_toctree.yml
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										73
									
								
								docs/source/en/_toctree.yml
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@ -44,6 +44,8 @@
 | 
			
		||||
      title: Use tokenizers from 🤗 Tokenizers
 | 
			
		||||
    - local: multilingual
 | 
			
		||||
      title: Inference for multilingual models
 | 
			
		||||
    - local: generation_strategies
 | 
			
		||||
      title: Text generation strategies
 | 
			
		||||
    - sections:
 | 
			
		||||
      - local: tasks/sequence_classification
 | 
			
		||||
        title: Text classification
 | 
			
		||||
@ -73,6 +75,10 @@
 | 
			
		||||
      title: Image classification
 | 
			
		||||
    - local: tasks/semantic_segmentation
 | 
			
		||||
      title: Semantic segmentation
 | 
			
		||||
    - local: tasks/video_classification
 | 
			
		||||
      title: Video classification
 | 
			
		||||
    - local: tasks/object_detection
 | 
			
		||||
      title: Object detection
 | 
			
		||||
    title: Computer Vision
 | 
			
		||||
  - sections:
 | 
			
		||||
    - local: performance
 | 
			
		||||
@ -105,6 +111,8 @@
 | 
			
		||||
      title: Debugging
 | 
			
		||||
    - local: hpo_train
 | 
			
		||||
      title: Hyperparameter Search using Trainer API
 | 
			
		||||
    - local: tf_xla
 | 
			
		||||
      title: XLA Integration for TensorFlow Models
 | 
			
		||||
    title: Performance and scalability
 | 
			
		||||
  - sections:
 | 
			
		||||
    - local: contributing
 | 
			
		||||
@ -135,7 +143,7 @@
 | 
			
		||||
  - local: glossary
 | 
			
		||||
    title: Glossary
 | 
			
		||||
  - local: task_summary
 | 
			
		||||
    title: Summary of the tasks
 | 
			
		||||
    title: What 🤗 Transformers can do
 | 
			
		||||
  - local: model_summary
 | 
			
		||||
    title: Summary of the models
 | 
			
		||||
  - local: tokenizer_summary
 | 
			
		||||
@ -146,6 +154,8 @@
 | 
			
		||||
    title: BERTology
 | 
			
		||||
  - local: perplexity
 | 
			
		||||
    title: Perplexity of fixed-length models
 | 
			
		||||
  - local: pipeline_webserver
 | 
			
		||||
    title: Pipelines for webserver inference
 | 
			
		||||
  title: Conceptual guides
 | 
			
		||||
- sections:
 | 
			
		||||
  - sections:
 | 
			
		||||
@ -183,6 +193,8 @@
 | 
			
		||||
      title: DeepSpeed Integration
 | 
			
		||||
    - local: main_classes/feature_extractor
 | 
			
		||||
      title: Feature Extractor
 | 
			
		||||
    - local: main_classes/image_processor
 | 
			
		||||
      title: Image Processor
 | 
			
		||||
    title: Main Classes
 | 
			
		||||
  - sections:
 | 
			
		||||
    - isExpanded: false
 | 
			
		||||
@ -207,6 +219,8 @@
 | 
			
		||||
        title: BigBird
 | 
			
		||||
      - local: model_doc/bigbird_pegasus
 | 
			
		||||
        title: BigBirdPegasus
 | 
			
		||||
      - local: model_doc/biogpt
 | 
			
		||||
        title: BioGpt
 | 
			
		||||
      - local: model_doc/blenderbot
 | 
			
		||||
        title: Blenderbot
 | 
			
		||||
      - local: model_doc/blenderbot-small
 | 
			
		||||
@ -247,6 +261,8 @@
 | 
			
		||||
        title: ERNIE
 | 
			
		||||
      - local: model_doc/esm
 | 
			
		||||
        title: ESM
 | 
			
		||||
      - local: model_doc/flan-t5
 | 
			
		||||
        title: FLAN-T5
 | 
			
		||||
      - local: model_doc/flaubert
 | 
			
		||||
        title: FlauBERT
 | 
			
		||||
      - local: model_doc/fnet
 | 
			
		||||
@ -267,10 +283,14 @@
 | 
			
		||||
        title: GPT-J
 | 
			
		||||
      - local: model_doc/gpt2
 | 
			
		||||
        title: GPT2
 | 
			
		||||
      - local: model_doc/gpt-sw3
 | 
			
		||||
        title: GPTSw3
 | 
			
		||||
      - local: model_doc/herbert
 | 
			
		||||
        title: HerBERT
 | 
			
		||||
      - local: model_doc/ibert
 | 
			
		||||
        title: I-BERT
 | 
			
		||||
      - local: model_doc/jukebox
 | 
			
		||||
        title: Jukebox
 | 
			
		||||
      - local: model_doc/layoutlm
 | 
			
		||||
        title: LayoutLM
 | 
			
		||||
      - local: model_doc/led
 | 
			
		||||
@ -337,12 +357,18 @@
 | 
			
		||||
        title: RetriBERT
 | 
			
		||||
      - local: model_doc/roberta
 | 
			
		||||
        title: RoBERTa
 | 
			
		||||
      - local: model_doc/roberta-prelayernorm
 | 
			
		||||
        title: RoBERTa-PreLayerNorm
 | 
			
		||||
      - local: model_doc/roc_bert
 | 
			
		||||
        title: RoCBert
 | 
			
		||||
      - local: model_doc/roformer
 | 
			
		||||
        title: RoFormer
 | 
			
		||||
      - local: model_doc/splinter
 | 
			
		||||
        title: Splinter
 | 
			
		||||
      - local: model_doc/squeezebert
 | 
			
		||||
        title: SqueezeBERT
 | 
			
		||||
      - local: model_doc/switch_transformers
 | 
			
		||||
        title: SwitchTransformers
 | 
			
		||||
      - local: model_doc/t5
 | 
			
		||||
        title: T5
 | 
			
		||||
      - local: model_doc/t5v1.1
 | 
			
		||||
@ -374,6 +400,8 @@
 | 
			
		||||
      sections:
 | 
			
		||||
      - local: model_doc/beit
 | 
			
		||||
        title: BEiT
 | 
			
		||||
      - local: model_doc/bit
 | 
			
		||||
        title: BiT
 | 
			
		||||
      - local: model_doc/conditional_detr
 | 
			
		||||
        title: Conditional DETR
 | 
			
		||||
      - local: model_doc/convnext
 | 
			
		||||
@ -386,20 +414,32 @@
 | 
			
		||||
        title: DeiT
 | 
			
		||||
      - local: model_doc/detr
 | 
			
		||||
        title: DETR
 | 
			
		||||
      - local: model_doc/dinat
 | 
			
		||||
        title: DiNAT
 | 
			
		||||
      - local: model_doc/dit
 | 
			
		||||
        title: DiT
 | 
			
		||||
      - local: model_doc/dpt
 | 
			
		||||
        title: DPT
 | 
			
		||||
      - local: model_doc/efficientformer
 | 
			
		||||
        title: EfficientFormer
 | 
			
		||||
      - local: model_doc/glpn
 | 
			
		||||
        title: GLPN
 | 
			
		||||
      - local: model_doc/imagegpt
 | 
			
		||||
        title: ImageGPT
 | 
			
		||||
      - local: model_doc/levit
 | 
			
		||||
        title: LeViT
 | 
			
		||||
      - local: model_doc/mask2former
 | 
			
		||||
        title: Mask2Former
 | 
			
		||||
      - local: model_doc/maskformer
 | 
			
		||||
        title: MaskFormer
 | 
			
		||||
      - local: model_doc/mobilenet_v1
 | 
			
		||||
        title: MobileNetV1
 | 
			
		||||
      - local: model_doc/mobilenet_v2
 | 
			
		||||
        title: MobileNetV2
 | 
			
		||||
      - local: model_doc/mobilevit
 | 
			
		||||
        title: MobileViT
 | 
			
		||||
      - local: model_doc/nat
 | 
			
		||||
        title: NAT
 | 
			
		||||
      - local: model_doc/poolformer
 | 
			
		||||
        title: PoolFormer
 | 
			
		||||
      - local: model_doc/regnet
 | 
			
		||||
@ -412,12 +452,22 @@
 | 
			
		||||
        title: Swin Transformer
 | 
			
		||||
      - local: model_doc/swinv2
 | 
			
		||||
        title: Swin Transformer V2
 | 
			
		||||
      - local: model_doc/swin2sr
 | 
			
		||||
        title: Swin2SR
 | 
			
		||||
      - local: model_doc/table-transformer
 | 
			
		||||
        title: Table Transformer
 | 
			
		||||
      - local: model_doc/timesformer
 | 
			
		||||
        title: TimeSformer
 | 
			
		||||
      - local: model_doc/upernet
 | 
			
		||||
        title: UperNet
 | 
			
		||||
      - local: model_doc/van
 | 
			
		||||
        title: VAN
 | 
			
		||||
      - local: model_doc/videomae
 | 
			
		||||
        title: VideoMAE
 | 
			
		||||
      - local: model_doc/vit
 | 
			
		||||
        title: Vision Transformer (ViT)
 | 
			
		||||
      - local: model_doc/vit_hybrid
 | 
			
		||||
        title: ViT Hybrid
 | 
			
		||||
      - local: model_doc/vit_mae
 | 
			
		||||
        title: ViTMAE
 | 
			
		||||
      - local: model_doc/vit_msn
 | 
			
		||||
@ -427,6 +477,8 @@
 | 
			
		||||
      title: Vision models
 | 
			
		||||
    - isExpanded: false
 | 
			
		||||
      sections:
 | 
			
		||||
      - local: model_doc/audio-spectrogram-transformer
 | 
			
		||||
        title: Audio Spectrogram Transformer
 | 
			
		||||
      - local: model_doc/hubert
 | 
			
		||||
        title: Hubert
 | 
			
		||||
      - local: model_doc/mctct
 | 
			
		||||
@ -460,14 +512,24 @@
 | 
			
		||||
      title: Audio models
 | 
			
		||||
    - isExpanded: false
 | 
			
		||||
      sections:
 | 
			
		||||
      - local: model_doc/altclip
 | 
			
		||||
        title: AltCLIP
 | 
			
		||||
      - local: model_doc/blip
 | 
			
		||||
        title: BLIP
 | 
			
		||||
      - local: model_doc/chinese_clip
 | 
			
		||||
        title: Chinese-CLIP
 | 
			
		||||
      - local: model_doc/clip
 | 
			
		||||
        title: CLIP
 | 
			
		||||
      - local: model_doc/clipseg
 | 
			
		||||
        title: CLIPSeg
 | 
			
		||||
      - local: model_doc/data2vec
 | 
			
		||||
        title: Data2Vec
 | 
			
		||||
      - local: model_doc/donut
 | 
			
		||||
        title: Donut
 | 
			
		||||
      - local: model_doc/flava
 | 
			
		||||
        title: FLAVA
 | 
			
		||||
      - local: model_doc/git
 | 
			
		||||
        title: GIT
 | 
			
		||||
      - local: model_doc/groupvit
 | 
			
		||||
        title: GroupViT
 | 
			
		||||
      - local: model_doc/layoutlmv2
 | 
			
		||||
@ -478,6 +540,8 @@
 | 
			
		||||
        title: LayoutXLM
 | 
			
		||||
      - local: model_doc/lxmert
 | 
			
		||||
        title: LXMERT
 | 
			
		||||
      - local: model_doc/oneformer
 | 
			
		||||
        title: OneFormer
 | 
			
		||||
      - local: model_doc/owlvit
 | 
			
		||||
        title: OWL-ViT
 | 
			
		||||
      - local: model_doc/perceiver
 | 
			
		||||
@ -509,6 +573,11 @@
 | 
			
		||||
      - local: model_doc/time_series_transformer
 | 
			
		||||
        title: Time Series Transformer
 | 
			
		||||
      title: Time series models
 | 
			
		||||
    - isExpanded: false
 | 
			
		||||
      sections:
 | 
			
		||||
      - local: model_doc/graphormer
 | 
			
		||||
        title: Graphormer
 | 
			
		||||
      title: Graph models
 | 
			
		||||
    title: Models
 | 
			
		||||
  - sections:
 | 
			
		||||
    - local: internal/modeling_utils
 | 
			
		||||
@ -526,4 +595,4 @@
 | 
			
		||||
    - local: internal/file_utils
 | 
			
		||||
      title: General Utilities
 | 
			
		||||
    title: Internal Helpers
 | 
			
		||||
  title: API
 | 
			
		||||
  title: API
 | 
			
		||||
@ -11,32 +11,26 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o
 | 
			
		||||
 | 
			
		||||
# How to add a model to 🤗 Transformers?
 | 
			
		||||
 | 
			
		||||
Adding a new model is often difficult and requires an in-depth knowledge of the 🤗 Transformers library and ideally also
 | 
			
		||||
of the model's original repository. At Hugging Face, we are trying to empower the community more and more to add models
 | 
			
		||||
independently. Thus, for some new models that the community wants to be added to 🤗 Transformers, we create a customized
 | 
			
		||||
*call-for-model-addition* that explains step-by-step how to add the requested model. With this
 | 
			
		||||
*call-for-model-addition*, we want to teach a motivated and experienced contributor of the community how to port a
 | 
			
		||||
model to 🤗 Transformers.
 | 
			
		||||
The 🤗 Transformers library is often able to offer new models thanks to community contributors. But this can be a challenging project and requires an in-depth knowledge of the 🤗 Transformers library and the model to implement. At Hugging Face, we're trying to empower more of the community to actively add models and we've put together this guide to walk you through the process of adding a PyTorch model (make sure you have [PyTorch installed](https://pytorch.org/get-started/locally/)).
 | 
			
		||||
 | 
			
		||||
If this sounds like something you would be interested in, feel free to check out the currently open
 | 
			
		||||
“calls-for-model-addition” [here](https://github.com/huggingface/transformers/tree/main/templates/adding_a_new_model/open_model_proposals/README.md)
 | 
			
		||||
and to contact us.
 | 
			
		||||
<Tip>
 | 
			
		||||
 | 
			
		||||
If selected, you will then work closely with one member of the Hugging Face team to integrate the model into 🤗
 | 
			
		||||
Transformers. By doing so, you will both gain a theoretical and deep practical understanding of the proposed model. But
 | 
			
		||||
more importantly, you will have made a major open-source contribution to 🤗 Transformers. Along the way, you will:
 | 
			
		||||
If you're interested in implementing a TensorFlow model, take a look at the [How to convert a 🤗 Transformers model to TensorFlow](add_tensorflow_model) guide!
 | 
			
		||||
 | 
			
		||||
-  get insights into open-source best practices
 | 
			
		||||
-  understand the design principles of one of the most popular NLP libraries
 | 
			
		||||
-  learn how to do efficiently test large NLP models
 | 
			
		||||
-  learn how to integrate Python utilities like `black`, `isort`, `make fix-copies` into a library to always
 | 
			
		||||
  ensure clean and readable code
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
We are also more than happy if you want to add a model that cannot be found in the “calls-for-model-addition” folder.
 | 
			
		||||
The following sections explain in detail how to add a new model. It might also be very helpful to check out already
 | 
			
		||||
added models to see if those resemble the model you would like to add [here](https://github.com/huggingface/transformers/pulls?q=is%3Apr+label%3A%22PR+for+Model+Addition%22+is%3Aclosed).
 | 
			
		||||
Along the way, you'll:
 | 
			
		||||
 | 
			
		||||
To start, let's try to get a general overview of the Transformers library.
 | 
			
		||||
- get insights into open-source best practices
 | 
			
		||||
- understand the design principles behind one of the most popular deep learning libraries
 | 
			
		||||
- learn how to efficiently test large models
 | 
			
		||||
- learn how to integrate Python utilities like `black`, `isort`, and `make fix-copies` to ensure clean and readable code
 | 
			
		||||
 | 
			
		||||
A Hugging Face team member will be available to help you along the way so you'll never be alone. 🤗 ❤️
 | 
			
		||||
 | 
			
		||||
To get started, open a [New model addition](https://github.com/huggingface/transformers/issues/new?assignees=&labels=New+model&template=new-model-addition.yml) issue for the model you want to see in 🤗 Transformers. If you're not especially picky about contributing a specific model, you can filter by the [New model label](https://github.com/huggingface/transformers/labels/New%20model) to see if there are any unclaimed model requests and work on it.
 | 
			
		||||
 | 
			
		||||
Once you've opened a new model request, the first step is to get familiar with 🤗 Transformers if you aren't already!
 | 
			
		||||
 | 
			
		||||
## General overview of 🤗 Transformers
 | 
			
		||||
 | 
			
		||||
@ -144,20 +138,20 @@ In the following, we try to give you a general recipe that we found most useful
 | 
			
		||||
The following list is a summary of everything that has to be done to add a model and can be used by you as a To-Do
 | 
			
		||||
List:
 | 
			
		||||
 | 
			
		||||
-  1. ☐ (Optional) Understood theoretical aspects
 | 
			
		||||
-  2. ☐ Prepared transformers dev environment
 | 
			
		||||
-  3. ☐ Set up debugging environment of the original repository
 | 
			
		||||
-  4. ☐ Created script that successfully runs forward pass using original repository and checkpoint
 | 
			
		||||
-  5. ☐ Successfully added the model skeleton to Transformers
 | 
			
		||||
-  6. ☐ Successfully converted original checkpoint to Transformers checkpoint
 | 
			
		||||
-  7. ☐ Successfully ran forward pass in Transformers that gives identical output to original checkpoint
 | 
			
		||||
-  8. ☐ Finished model tests in Transformers
 | 
			
		||||
-  9. ☐ Successfully added Tokenizer in Transformers
 | 
			
		||||
-  10. ☐ Run end-to-end integration tests
 | 
			
		||||
-  11. ☐ Finished docs
 | 
			
		||||
-  12. ☐ Uploaded model weights to the hub
 | 
			
		||||
-  13. ☐ Submitted the pull request
 | 
			
		||||
-  14. ☐ (Optional) Added a demo notebook
 | 
			
		||||
☐ (Optional) Understood the model's theoretical aspects<br>
 | 
			
		||||
☐ Prepared 🤗 Transformers dev environment<br>
 | 
			
		||||
☐ Set up debugging environment of the original repository<br>
 | 
			
		||||
☐ Created script that successfully runs the `forward()` pass using the original repository and checkpoint<br>
 | 
			
		||||
☐ Successfully added the model skeleton to 🤗 Transformers<br>
 | 
			
		||||
☐ Successfully converted original checkpoint to 🤗 Transformers checkpoint<br>
 | 
			
		||||
☐ Successfully ran `forward()` pass in 🤗 Transformers that gives identical output to original checkpoint<br>
 | 
			
		||||
☐ Finished model tests in 🤗 Transformers<br>
 | 
			
		||||
☐ Successfully added tokenizer in 🤗 Transformers<br>
 | 
			
		||||
☐ Run end-to-end integration tests<br>
 | 
			
		||||
☐ Finished docs<br>
 | 
			
		||||
☐ Uploaded model weights to the Hub<br>
 | 
			
		||||
☐ Submitted the pull request<br>
 | 
			
		||||
☐ (Optional) Added a demo notebook
 | 
			
		||||
 | 
			
		||||
To begin with, we usually recommend to start by getting a good theoretical understanding of `BrandNewBert`. However,
 | 
			
		||||
if you prefer to understand the theoretical aspects of the model *on-the-job*, then it is totally fine to directly dive
 | 
			
		||||
@ -274,7 +268,7 @@ In general, there are two possible debugging environments for running the origin
 | 
			
		||||
Jupyter notebooks have the advantage that they allow for cell-by-cell execution which can be helpful to better split
 | 
			
		||||
logical components from one another and to have faster debugging cycles as intermediate results can be stored. Also,
 | 
			
		||||
notebooks are often easier to share with other contributors, which might be very helpful if you want to ask the Hugging
 | 
			
		||||
Face team for help. If you are familiar with Jupiter notebooks, we strongly recommend you to work with them.
 | 
			
		||||
Face team for help. If you are familiar with Jupyter notebooks, we strongly recommend you to work with them.
 | 
			
		||||
 | 
			
		||||
The obvious disadvantage of Jupyter notebooks is that if you are not used to working with them you will have to spend
 | 
			
		||||
some time adjusting to the new programming environment and that you might not be able to use your known debugging tools
 | 
			
		||||
@ -773,7 +767,7 @@ tests for you.
 | 
			
		||||
 | 
			
		||||
Now, all the necessary functionality for *brand_new_bert* is added - you're almost done! The only thing left to add is
 | 
			
		||||
a nice docstring and a doc page. The Cookiecutter should have added a template file called
 | 
			
		||||
`docs/source/model_doc/brand_new_bert.rst` that you should fill out. Users of your model will usually first look at
 | 
			
		||||
`docs/source/model_doc/brand_new_bert.mdx` that you should fill out. Users of your model will usually first look at
 | 
			
		||||
this page before using your model. Hence, the documentation must be understandable and concise. It is very useful for
 | 
			
		||||
the community to add some *Tips* to show how the model should be used. Don't hesitate to ping the Hugging Face team
 | 
			
		||||
regarding the docstrings.
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o
 | 
			
		||||
# How to create a custom pipeline?
 | 
			
		||||
 | 
			
		||||
In this guide, we will see how to create a custom pipeline and share it on the [Hub](hf.co/models) or add it to the
 | 
			
		||||
Transformers library.
 | 
			
		||||
🤗 Transformers library.
 | 
			
		||||
 | 
			
		||||
First and foremost, you need to decide the raw entries the pipeline will be able to take. It can be strings, raw bytes,
 | 
			
		||||
dictionaries or whatever seems to be the most likely desired input. Try to keep these inputs as pure Python as possible
 | 
			
		||||
@ -22,8 +22,8 @@ pipeline (`preprocess`).
 | 
			
		||||
Then define the `outputs`. Same policy as the `inputs`. The simpler, the better. Those will be the outputs of
 | 
			
		||||
`postprocess` method.
 | 
			
		||||
 | 
			
		||||
Start by inheriting the base class `Pipeline`. with the 4 methods needed to implement `preprocess`,
 | 
			
		||||
`_forward`, `postprocess` and `_sanitize_parameters`.
 | 
			
		||||
Start by inheriting the base class `Pipeline` with the 4 methods needed to implement `preprocess`,
 | 
			
		||||
`_forward`, `postprocess`, and `_sanitize_parameters`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
@ -62,14 +62,14 @@ contain more information and is usually a `Dict`.
 | 
			
		||||
called method as it contains safeguards to make sure everything is working on the expected device. If anything is
 | 
			
		||||
linked to a real model it belongs in the `_forward` method, anything else is in the preprocess/postprocess.
 | 
			
		||||
 | 
			
		||||
`postprocess` methods will take the output of `_forward` and turn it into the final output that were decided
 | 
			
		||||
`postprocess` methods will take the output of `_forward` and turn it into the final output that was decided
 | 
			
		||||
earlier.
 | 
			
		||||
 | 
			
		||||
`_sanitize_parameters` exists to allow users to pass any parameters whenever they wish, be it at initialization
 | 
			
		||||
time `pipeline(...., maybe_arg=4)` or at call time `pipe = pipeline(...); output = pipe(...., maybe_arg=4)`.
 | 
			
		||||
 | 
			
		||||
The returns of `_sanitize_parameters` are the 3 dicts of kwargs that will be passed directly to `preprocess`,
 | 
			
		||||
`_forward` and `postprocess`. Don't fill anything if the caller didn't call with any extra parameter. That
 | 
			
		||||
`_forward`, and `postprocess`. Don't fill anything if the caller didn't call with any extra parameter. That
 | 
			
		||||
allows to keep the default arguments in the function definition which is always more "natural".
 | 
			
		||||
 | 
			
		||||
A classic example would be a `top_k` argument in the post processing in classification tasks.
 | 
			
		||||
@ -126,7 +126,7 @@ PIPELINE_REGISTRY.register_pipeline(
 | 
			
		||||
)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You can specify a default model if you want, in which case it should come with a specific revision (which can be the name of a branch or a commit hash, here we took `"abcdef"`) as well was the type:
 | 
			
		||||
You can specify a default model if you want, in which case it should come with a specific revision (which can be the name of a branch or a commit hash, here we took `"abcdef"`) as well as the type:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
PIPELINE_REGISTRY.register_pipeline(
 | 
			
		||||
@ -225,9 +225,9 @@ from transformers import pipeline
 | 
			
		||||
classifier = pipeline(model="{your_username}/test-dynamic-pipeline", trust_remote_code=True)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Add the pipeline to Transformers
 | 
			
		||||
## Add the pipeline to 🤗 Transformers
 | 
			
		||||
 | 
			
		||||
If you want to contribute your pipeline to Transformers, you will need to add a new module in the `pipelines` submodule
 | 
			
		||||
If you want to contribute your pipeline to 🤗 Transformers, you will need to add a new module in the `pipelines` submodule
 | 
			
		||||
with the code of your pipeline, then add it in the list of tasks defined in `pipelines/__init__.py`.
 | 
			
		||||
 | 
			
		||||
Then you will need to add tests. Create a new file `tests/test_pipelines_MY_PIPELINE.py` with example with the other tests.
 | 
			
		||||
@ -237,7 +237,7 @@ architecture as defined by `model_mapping` and `tf_model_mapping`.
 | 
			
		||||
 | 
			
		||||
This is very important to test future compatibility, meaning if someone adds a new model for
 | 
			
		||||
`XXXForQuestionAnswering` then the pipeline test will attempt to run on it. Because the models are random it's
 | 
			
		||||
impossible to check for actual values, that's why There is a helper `ANY` that will simply attempt to match the
 | 
			
		||||
impossible to check for actual values, that's why there is a helper `ANY` that will simply attempt to match the
 | 
			
		||||
output of the pipeline TYPE.
 | 
			
		||||
 | 
			
		||||
You also *need* to implement 2 (ideally 4) tests.
 | 
			
		||||
@ -248,7 +248,7 @@ You also *need* to implement 2 (ideally 4) tests.
 | 
			
		||||
  and test the pipeline outputs. The results should be the same as `test_small_model_pt`.
 | 
			
		||||
- `test_large_model_pt` (`optional`): Tests the pipeline on a real pipeline where the results are supposed to
 | 
			
		||||
  make sense. These tests are slow and should be marked as such. Here the goal is to showcase the pipeline and to make
 | 
			
		||||
  sure there is no drift in future releases
 | 
			
		||||
  sure there is no drift in future releases.
 | 
			
		||||
- `test_large_model_tf` (`optional`): Tests the pipeline on a real pipeline where the results are supposed to
 | 
			
		||||
  make sense. These tests are slow and should be marked as such. Here the goal is to showcase the pipeline and to make
 | 
			
		||||
  sure there is no drift in future releases
 | 
			
		||||
  sure there is no drift in future releases.
 | 
			
		||||
 | 
			
		||||
@ -179,7 +179,7 @@ Now it's time to finally start coding. Our suggested starting point is the PyTor
 | 
			
		||||
`modeling_brand_new_bert.py` inside `src/transformers/models/brand_new_bert/` into
 | 
			
		||||
`modeling_tf_brand_new_bert.py`. The goal of this section is to modify the file and update the import structure of
 | 
			
		||||
🤗 Transformers such that you can import `TFBrandNewBert` and
 | 
			
		||||
`TFBrandNewBert.from_pretrained(model_repo, from_pt=True)` sucessfully loads a working TensorFlow *BrandNewBert* model.
 | 
			
		||||
`TFBrandNewBert.from_pretrained(model_repo, from_pt=True)` successfully loads a working TensorFlow *BrandNewBert* model.
 | 
			
		||||
 | 
			
		||||
Sadly, there is no prescription to convert a PyTorch model into TensorFlow. You can, however, follow our selection of
 | 
			
		||||
tips to make the process as smooth as possible:
 | 
			
		||||
@ -217,7 +217,7 @@ documentation pages. You can complete this part entirely following the patterns
 | 
			
		||||
([example](https://github.com/huggingface/transformers/pull/18020/files)). Here's a list of the needed manual
 | 
			
		||||
changes:
 | 
			
		||||
- Include all public classes of *BrandNewBert* in `src/transformers/__init__.py`
 | 
			
		||||
- Add *BrandNewBert* classes to the corresponing Auto classes in `src/transformers/models/auto/modeling_tf_auto.py`
 | 
			
		||||
- Add *BrandNewBert* classes to the corresponding Auto classes in `src/transformers/models/auto/modeling_tf_auto.py`
 | 
			
		||||
- Include the modeling file in the documentation test file list in `utils/documentation_tests.txt`
 | 
			
		||||
- Add the lazy loading classes related to *BrandNewBert* in `src/transformers/utils/dummy_tf_objects.py`
 | 
			
		||||
- Update the import structures for the public classes in `src/transformers/models/brand_new_bert/__init__.py`
 | 
			
		||||
 | 
			
		||||
@ -23,6 +23,7 @@ Remember, architecture refers to the skeleton of the model and checkpoints are t
 | 
			
		||||
In this tutorial, learn to:
 | 
			
		||||
 | 
			
		||||
* Load a pretrained tokenizer.
 | 
			
		||||
* Load a pretrained image processor
 | 
			
		||||
* Load a pretrained feature extractor.
 | 
			
		||||
* Load a pretrained processor.
 | 
			
		||||
* Load a pretrained model.
 | 
			
		||||
@ -49,9 +50,20 @@ Then tokenize your input as shown below:
 | 
			
		||||
 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## AutoImageProcessor
 | 
			
		||||
 | 
			
		||||
For vision tasks, an image processor processes the image into the correct input format.
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import AutoImageProcessor
 | 
			
		||||
 | 
			
		||||
>>> image_processor = AutoImageProcessor.from_pretrained("google/vit-base-patch16-224")
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## AutoFeatureExtractor
 | 
			
		||||
 | 
			
		||||
For audio and vision tasks, a feature extractor processes the audio signal or image into the correct input format.
 | 
			
		||||
For audio tasks, a feature extractor processes the audio signal the correct input format.
 | 
			
		||||
 | 
			
		||||
Load a feature extractor with [`AutoFeatureExtractor.from_pretrained`]:
 | 
			
		||||
 | 
			
		||||
@ -65,7 +77,7 @@ Load a feature extractor with [`AutoFeatureExtractor.from_pretrained`]:
 | 
			
		||||
 | 
			
		||||
## AutoProcessor
 | 
			
		||||
 | 
			
		||||
Multimodal tasks require a processor that combines two types of preprocessing tools. For example, the [LayoutLMV2](model_doc/layoutlmv2) model requires a feature extractor to handle images and a tokenizer to handle text; a processor combines both of them.
 | 
			
		||||
Multimodal tasks require a processor that combines two types of preprocessing tools. For example, the [LayoutLMV2](model_doc/layoutlmv2) model requires an image processor to handle images and a tokenizer to handle text; a processor combines both of them.
 | 
			
		||||
 | 
			
		||||
Load a processor with [`AutoProcessor.from_pretrained`]:
 | 
			
		||||
 | 
			
		||||
@ -103,7 +115,7 @@ TensorFlow and Flax checkpoints are not affected, and can be loaded within PyTor
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
Generally, we recommend using the `AutoTokenizer` class and the `AutoModelFor` class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next [tutorial](preprocessing), learn how to use your newly loaded tokenizer, feature extractor and processor to preprocess a dataset for fine-tuning.
 | 
			
		||||
Generally, we recommend using the `AutoTokenizer` class and the `AutoModelFor` class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next [tutorial](preprocessing), learn how to use your newly loaded tokenizer, image processor, feature extractor and processor to preprocess a dataset for fine-tuning.
 | 
			
		||||
</pt>
 | 
			
		||||
<tf>
 | 
			
		||||
Finally, the `TFAutoModelFor` classes let you load a pretrained model for a given task (see [here](model_doc/auto) for a complete list of available tasks). For example, load a model for sequence classification with [`TFAutoModelForSequenceClassification.from_pretrained`]:
 | 
			
		||||
@ -122,6 +134,6 @@ Easily reuse the same checkpoint to load an architecture for a different task:
 | 
			
		||||
>>> model = TFAutoModelForTokenClassification.from_pretrained("distilbert-base-uncased")
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Generally, we recommend using the `AutoTokenizer` class and the `TFAutoModelFor` class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next [tutorial](preprocessing), learn how to use your newly loaded tokenizer, feature extractor and processor to preprocess a dataset for fine-tuning.
 | 
			
		||||
Generally, we recommend using the `AutoTokenizer` class and the `TFAutoModelFor` class to load pretrained instances of models. This will ensure you load the correct architecture every time. In the next [tutorial](preprocessing), learn how to use your newly loaded tokenizer, image processor, feature extractor and processor to preprocess a dataset for fine-tuning.
 | 
			
		||||
</tf>
 | 
			
		||||
</frameworkcontent>
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,7 @@ On top of the configuration of the model, we see three different weights files,
 | 
			
		||||
 | 
			
		||||
The main advantage of doing this for big models is that during step 2 of the workflow shown above, each shard of the checkpoint is loaded after the previous one, capping the memory usage in RAM to the model size plus the size of the biggest shard.
 | 
			
		||||
 | 
			
		||||
Beind the scenes, the index file is used to determine which keys are in the checkpoint, and where the corresponding weights are stored. We can load that index like any json and get a dictionary:
 | 
			
		||||
Behind the scenes, the index file is used to determine which keys are in the checkpoint, and where the corresponding weights are stored. We can load that index like any json and get a dictionary:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> import json
 | 
			
		||||
@ -86,7 +86,7 @@ Beind the scenes, the index file is used to determine which keys are in the chec
 | 
			
		||||
dict_keys(['metadata', 'weight_map'])
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The metadata just consists of the total size of the model for now. We plan to add several other informations in the future:
 | 
			
		||||
The metadata just consists of the total size of the model for now. We plan to add other information in the future:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> index["metadata"]
 | 
			
		||||
 | 
			
		||||
@ -17,7 +17,8 @@ An [`AutoClass`](model_doc/auto) automatically infers the model architecture and
 | 
			
		||||
- Load and customize a model configuration.
 | 
			
		||||
- Create a model architecture.
 | 
			
		||||
- Create a slow and fast tokenizer for text.
 | 
			
		||||
- Create a feature extractor for audio or image tasks.
 | 
			
		||||
- Create an image processor for vision tasks.
 | 
			
		||||
- Create a feature extractor for audio tasks.
 | 
			
		||||
- Create a processor for multimodal tasks.
 | 
			
		||||
 | 
			
		||||
## Configuration
 | 
			
		||||
@ -244,21 +245,21 @@ By default, [`AutoTokenizer`] will try to load a fast tokenizer. You can disable
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
## Feature Extractor
 | 
			
		||||
## Image Processor
 | 
			
		||||
 | 
			
		||||
A feature extractor processes audio or image inputs. It inherits from the base [`~feature_extraction_utils.FeatureExtractionMixin`] class, and may also inherit from the [`ImageFeatureExtractionMixin`] class for processing image features or the [`SequenceFeatureExtractor`] class for processing audio inputs.
 | 
			
		||||
An image processor processes vision inputs. It inherits from the base [`~image_processing_utils.ImageProcessingMixin`] class.
 | 
			
		||||
 | 
			
		||||
Depending on whether you are working on an audio or vision task, create a feature extractor associated with the model you're using. For example, create a default [`ViTFeatureExtractor`] if you are using [ViT](model_doc/vit) for image classification:
 | 
			
		||||
To use, create an image processor associated with the model you're using. For example, create a default [`ViTImageProcessor`] if you are using [ViT](model_doc/vit) for image classification:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import ViTFeatureExtractor
 | 
			
		||||
>>> from transformers import ViTImageProcessor
 | 
			
		||||
 | 
			
		||||
>>> vit_extractor = ViTFeatureExtractor()
 | 
			
		||||
>>> vit_extractor = ViTImageProcessor()
 | 
			
		||||
>>> print(vit_extractor)
 | 
			
		||||
ViTFeatureExtractor {
 | 
			
		||||
ViTImageProcessor {
 | 
			
		||||
  "do_normalize": true,
 | 
			
		||||
  "do_resize": true,
 | 
			
		||||
  "feature_extractor_type": "ViTFeatureExtractor",
 | 
			
		||||
  "feature_extractor_type": "ViTImageProcessor",
 | 
			
		||||
  "image_mean": [
 | 
			
		||||
    0.5,
 | 
			
		||||
    0.5,
 | 
			
		||||
@ -276,21 +277,21 @@ ViTFeatureExtractor {
 | 
			
		||||
 | 
			
		||||
<Tip>
 | 
			
		||||
 | 
			
		||||
If you aren't looking for any customization, just use the `from_pretrained` method to load a model's default feature extractor parameters.
 | 
			
		||||
If you aren't looking for any customization, just use the `from_pretrained` method to load a model's default image processor parameters.
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
Modify any of the [`ViTFeatureExtractor`] parameters to create your custom feature extractor:
 | 
			
		||||
Modify any of the [`ViTImageProcessor`] parameters to create your custom image processor:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import ViTFeatureExtractor
 | 
			
		||||
>>> from transformers import ViTImageProcessor
 | 
			
		||||
 | 
			
		||||
>>> my_vit_extractor = ViTFeatureExtractor(resample="PIL.Image.BOX", do_normalize=False, image_mean=[0.3, 0.3, 0.3])
 | 
			
		||||
>>> my_vit_extractor = ViTImageProcessor(resample="PIL.Image.BOX", do_normalize=False, image_mean=[0.3, 0.3, 0.3])
 | 
			
		||||
>>> print(my_vit_extractor)
 | 
			
		||||
ViTFeatureExtractor {
 | 
			
		||||
ViTImageProcessor {
 | 
			
		||||
  "do_normalize": false,
 | 
			
		||||
  "do_resize": true,
 | 
			
		||||
  "feature_extractor_type": "ViTFeatureExtractor",
 | 
			
		||||
  "feature_extractor_type": "ViTImageProcessor",
 | 
			
		||||
  "image_mean": [
 | 
			
		||||
    0.3,
 | 
			
		||||
    0.3,
 | 
			
		||||
@ -306,7 +307,11 @@ ViTFeatureExtractor {
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For audio inputs, you can create a [`Wav2Vec2FeatureExtractor`] and customize the parameters in a similar way:
 | 
			
		||||
## Feature Extractor
 | 
			
		||||
 | 
			
		||||
A feature extractor processes audio inputs. It inherits from the base [`~feature_extraction_utils.FeatureExtractionMixin`] class, and may also inherit from the [`SequenceFeatureExtractor`] class for processing audio inputs.
 | 
			
		||||
 | 
			
		||||
To use, create a feature extractor associated with the model you're using. For example, create a default [`Wav2Vec2FeatureExtractor`] if you are using [Wav2Vec2](model_doc/wav2vec2) for audio classification:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import Wav2Vec2FeatureExtractor
 | 
			
		||||
@ -324,9 +329,34 @@ Wav2Vec2FeatureExtractor {
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<Tip>
 | 
			
		||||
 | 
			
		||||
If you aren't looking for any customization, just use the `from_pretrained` method to load a model's default feature extractor parameters.
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
Modify any of the [`Wav2Vec2FeatureExtractor`] parameters to create your custom feature extractor:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import Wav2Vec2FeatureExtractor
 | 
			
		||||
 | 
			
		||||
>>> w2v2_extractor = Wav2Vec2FeatureExtractor(sampling_rate=8000, do_normalize=False)
 | 
			
		||||
>>> print(w2v2_extractor)
 | 
			
		||||
Wav2Vec2FeatureExtractor {
 | 
			
		||||
  "do_normalize": false,
 | 
			
		||||
  "feature_extractor_type": "Wav2Vec2FeatureExtractor",
 | 
			
		||||
  "feature_size": 1,
 | 
			
		||||
  "padding_side": "right",
 | 
			
		||||
  "padding_value": 0.0,
 | 
			
		||||
  "return_attention_mask": false,
 | 
			
		||||
  "sampling_rate": 8000
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Processor
 | 
			
		||||
 | 
			
		||||
For models that support multimodal tasks, 🤗 Transformers offers a processor class that conveniently wraps a feature extractor and tokenizer into a single object. For example, let's use the [`Wav2Vec2Processor`] for an automatic speech recognition task (ASR). ASR transcribes audio to text, so you will need a feature extractor and a tokenizer.
 | 
			
		||||
For models that support multimodal tasks, 🤗 Transformers offers a processor class that conveniently wraps processing classes such as a feature extractor and a tokenizer into a single object. For example, let's use the [`Wav2Vec2Processor`] for an automatic speech recognition task (ASR). ASR transcribes audio to text, so you will need a feature extractor and a tokenizer.
 | 
			
		||||
 | 
			
		||||
Create a feature extractor to handle the audio inputs:
 | 
			
		||||
 | 
			
		||||
@ -352,4 +382,4 @@ Combine the feature extractor and tokenizer in [`Wav2Vec2Processor`]:
 | 
			
		||||
>>> processor = Wav2Vec2Processor(feature_extractor=feature_extractor, tokenizer=tokenizer)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
With two basic classes - configuration and model - and an additional preprocessing class (tokenizer, feature extractor, or processor), you can create any of the models supported by 🤗 Transformers. Each of these base classes are configurable, allowing you to use the specific attributes you want. You can easily setup a model for training or modify an existing pretrained model to fine-tune.
 | 
			
		||||
With two basic classes - configuration and model - and an additional preprocessing class (tokenizer, image processor, feature extractor, or processor), you can create any of the models supported by 🤗 Transformers. Each of these base classes are configurable, allowing you to use the specific attributes you want. You can easily setup a model for training or modify an existing pretrained model to fine-tune.
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@ with the community (with the code it relies on) so that anyone can use it, even
 | 
			
		||||
Transformers library.
 | 
			
		||||
 | 
			
		||||
We will illustrate all of this on a ResNet model, by wrapping the ResNet class of the
 | 
			
		||||
[timm library](https://github.com/rwightman/pytorch-image-models/tree/master/timm) into a [`PreTrainedModel`].
 | 
			
		||||
[timm library](https://github.com/rwightman/pytorch-image-models) into a [`PreTrainedModel`].
 | 
			
		||||
 | 
			
		||||
## Writing a custom configuration
 | 
			
		||||
 | 
			
		||||
@ -55,9 +55,9 @@ class ResnetConfig(PretrainedConfig):
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    ):
 | 
			
		||||
        if block_type not in ["basic", "bottleneck"]:
 | 
			
		||||
            raise ValueError(f"`block` must be 'basic' or bottleneck', got {block}.")
 | 
			
		||||
            raise ValueError(f"`block_type` must be 'basic' or bottleneck', got {block_type}.")
 | 
			
		||||
        if stem_type not in ["", "deep", "deep-tiered"]:
 | 
			
		||||
            raise ValueError(f"`stem_type` must be '', 'deep' or 'deep-tiered', got {block}.")
 | 
			
		||||
            raise ValueError(f"`stem_type` must be '', 'deep' or 'deep-tiered', got {stem_type}.")
 | 
			
		||||
 | 
			
		||||
        self.block_type = block_type
 | 
			
		||||
        self.layers = layers
 | 
			
		||||
@ -146,6 +146,9 @@ class ResnetModel(PreTrainedModel):
 | 
			
		||||
For the model that will classify images, we just change the forward method:
 | 
			
		||||
 | 
			
		||||
```py
 | 
			
		||||
import torch
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ResnetModelForImageClassification(PreTrainedModel):
 | 
			
		||||
    config_class = ResnetConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -276,7 +276,7 @@ from transformers.debug_utils import DebugUnderflowOverflow
 | 
			
		||||
debug_overflow = DebugUnderflowOverflow(model, max_frames_to_save=100)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Specific batch absolute mix and max value tracing
 | 
			
		||||
### Specific batch absolute min and max value tracing
 | 
			
		||||
 | 
			
		||||
The same debugging class can be used for per-batch tracing with the underflow/overflow detection feature turned off.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										306
									
								
								docs/source/en/generation_strategies.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										306
									
								
								docs/source/en/generation_strategies.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,306 @@
 | 
			
		||||
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Text generation strategies
 | 
			
		||||
 | 
			
		||||
Text generation is essential to many NLP tasks, such as open-ended text generation, summarization, translation, and
 | 
			
		||||
more. It also plays a role in a variety of mixed-modality applications that have text as an output like speech-to-text
 | 
			
		||||
and vision-to-text. Some of the models that can generate text include
 | 
			
		||||
GPT2, XLNet, OpenAI GPT, CTRL, TransformerXL, XLM, Bart, T5, GIT, Whisper.
 | 
			
		||||
 | 
			
		||||
Check out a few examples that use [`~transformers.generation_utils.GenerationMixin.generate`] method to produce
 | 
			
		||||
text outputs for different tasks:
 | 
			
		||||
* [Text summarization](./tasks/summarization#inference)
 | 
			
		||||
* [Image captioning](./model_doc/git#transformers.GitForCausalLM.forward.example)
 | 
			
		||||
* [Audio transcription](./model_doc/whisper#transformers.WhisperForConditionalGeneration.forward.example)
 | 
			
		||||
 | 
			
		||||
Note that the inputs to the generate method depend on the model's modality. They are returned by the model's preprocessor
 | 
			
		||||
class, such as AutoTokenizer or AutoProcessor. If a model's preprocessor creates more than one kind of input, pass all
 | 
			
		||||
the inputs to generate(). You can learn more about the individual model's preprocessor in the corresponding model's documentation.
 | 
			
		||||
 | 
			
		||||
The process of selecting output tokens to generate text is known as decoding, and you can customize the decoding strategy
 | 
			
		||||
that the `generate()` method will use. Modifying a decoding strategy does not change the values of any trainable parameters.
 | 
			
		||||
However, it can have a noticeable impact on the quality of the generated output. It can help reduce repetition in the text
 | 
			
		||||
and make it more coherent.
 | 
			
		||||
 | 
			
		||||
This guide describes:
 | 
			
		||||
* default generation configuration
 | 
			
		||||
* common decoding strategies and their main parameters
 | 
			
		||||
* saving and sharing custom generation configurations with your fine-tuned model on 🤗 Hub
 | 
			
		||||
 | 
			
		||||
## Default text generation configuration
 | 
			
		||||
 | 
			
		||||
A decoding strategy for a model is defined in its generation configuration. When using pre-trained models for inference
 | 
			
		||||
within a [`pipeline`], the models call the `PreTrainedModel.generate()` method that applies a default generation
 | 
			
		||||
configuration under the hood. The default configuration is also used when no custom configuration has been saved with
 | 
			
		||||
the model.
 | 
			
		||||
 | 
			
		||||
When you load a model explicitly, you can inspect the generation configuration that comes with it through
 | 
			
		||||
 `model.generation_config`:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained("distilgpt2")
 | 
			
		||||
>>> model.generation_config
 | 
			
		||||
GenerationConfig {
 | 
			
		||||
    "_from_model_config": true,
 | 
			
		||||
    "bos_token_id": 50256,
 | 
			
		||||
    "eos_token_id": 50256,
 | 
			
		||||
    "transformers_version": "4.26.0.dev0"
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Printing out the `model.generation_config` reveals only the values that are different from the default generation
 | 
			
		||||
configuration, and does not list any of the default values.
 | 
			
		||||
 | 
			
		||||
The default generation configuration limits the size of the output combined with the input prompt to a maximum of 20
 | 
			
		||||
tokens to avoid running into resource limitations. The default decoding strategy is greedy search, which is the simplest decoding strategy that picks a token with the highest probability as the next token. For many tasks
 | 
			
		||||
and small output sizes this works well. However, when used to generate longer outputs, greedy search can start
 | 
			
		||||
producing highly repetitive results.
 | 
			
		||||
 | 
			
		||||
## Customize text generation
 | 
			
		||||
 | 
			
		||||
You can override any `generation_config` by passing the parameters and their values directly to the [`generate`] method:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> my_model.generate(**inputs, num_beams=4, do_sample=True)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Even if the default decoding strategy mostly works for your task, you can still tweak a few things. Some of the
 | 
			
		||||
commonly adjusted parameters include:
 | 
			
		||||
 | 
			
		||||
- `max_new_tokens`: the maximum number of tokens to generate. In other words, the size of the output sequence, not
 | 
			
		||||
including the tokens in the prompt.
 | 
			
		||||
- `num_beams`: by specifying a number of beams higher than 1, you are effectively switching from greedy search to
 | 
			
		||||
beam search. This strategy evaluates several hypotheses at each time step and eventually chooses the hypothesis that
 | 
			
		||||
has the overall highest probability for the entire sequence. This has the advantage of identifying high-probability
 | 
			
		||||
sequences that start with a lower probability initial tokens and would've been ignored by the greedy search.
 | 
			
		||||
- `do_sample`: if set to `True`, this parameter enables decoding strategies such as multinomial sampling, beam-search
 | 
			
		||||
multinomial sampling, Top-K sampling and Top-p sampling. All these strategies select the next token from the probability
 | 
			
		||||
distribution over the entire vocabulary with various strategy-specific adjustments.
 | 
			
		||||
- `num_return_sequences`: the number of sequence candidates to return for each input. This options is only available for
 | 
			
		||||
the decoding strategies that support multiple sequence candidates, e.g. variations of beam search and sampling. Decoding
 | 
			
		||||
strategies like greedy search and contrastive search return a single output sequence.
 | 
			
		||||
 | 
			
		||||
## Save a custom decoding strategy with your model
 | 
			
		||||
 | 
			
		||||
If you would like to share your fine-tuned model with a specific generation configuration, you can:
 | 
			
		||||
* Create a [`GenerationConfig`] class instance
 | 
			
		||||
* Specify the decoding strategy parameters
 | 
			
		||||
* Save your generation configuration with [`GenerationConfig.save_pretrained`], making sure to leave its `config_file_name` argument empty
 | 
			
		||||
* Set `push_to_hub` to `True` to upload your config to the model's repo
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForCausalLM, GenerationConfig
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained("my_account/my_model")
 | 
			
		||||
>>> generation_config = GenerationConfig(
 | 
			
		||||
...     max_new_tokens=50, do_sample=True, top_k=50, eos_token_id=model.config.eos_token_id
 | 
			
		||||
... )
 | 
			
		||||
>>> generation_config.save_pretrained("my_account/my_model", push_to_hub=True)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You can also store several generation configurations in a single directory, making use of the `config_file_name`
 | 
			
		||||
argument in [`GenerationConfig.save_pretrained`]. You can later instantiate them with [`GenerationConfig.from_pretrained`]. This is useful if you want to
 | 
			
		||||
store several generation configurations for a single model (e.g. one for creative text generation with sampling, and
 | 
			
		||||
one for summarization with beam search). You must have the right Hub permissions to add configuration files to a model.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, GenerationConfig
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("t5-small")
 | 
			
		||||
>>> model = AutoModelForSeq2SeqLM.from_pretrained("t5-small")
 | 
			
		||||
 | 
			
		||||
>>> translation_generation_config = GenerationConfig(
 | 
			
		||||
...     num_beams=4,
 | 
			
		||||
...     early_stopping=True,
 | 
			
		||||
...     decoder_start_token_id=0,
 | 
			
		||||
...     eos_token_id=model.config.eos_token_id,
 | 
			
		||||
...     pad_token=model.config.pad_token_id,
 | 
			
		||||
... )
 | 
			
		||||
 | 
			
		||||
>>> translation_generation_config.save_pretrained("t5-small", "translation_generation_config.json", push_to_hub=True)
 | 
			
		||||
 | 
			
		||||
>>> # You could then use the named generation config file to parameterize generation
 | 
			
		||||
>>> generation_config = GenerationConfig.from_pretrained("t5-small", "translation_generation_config.json")
 | 
			
		||||
>>> inputs = tokenizer("translate English to French: Configuration files are easy to use!", return_tensors="pt")
 | 
			
		||||
>>> outputs = model.generate(**inputs, generation_config=generation_config)
 | 
			
		||||
>>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
 | 
			
		||||
['Les fichiers de configuration sont faciles à utiliser !']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Decoding strategies
 | 
			
		||||
 | 
			
		||||
Certain combinations of the `generate()` parameters, and ultimately `generation_config`, can be used to enable specific
 | 
			
		||||
decoding strategies. If you are new to this concept, we recommend reading [this blog post that illustrates how common decoding strategies work](https://huggingface.co/blog/how-to-generate).
 | 
			
		||||
 | 
			
		||||
Here, we'll show some of the parameters that control the decoding strategies and illustrate how you can use them.
 | 
			
		||||
 | 
			
		||||
### Greedy Search
 | 
			
		||||
 | 
			
		||||
[`generate`] uses greedy search decoding by default so you don't have to pass any parameters to enable it. This means the parameters `num_beams` is set to 1 and `do_sample=False`.
 | 
			
		||||
`do_sample=False`. Because it is a default strategy, you do not have to pass any parameters to `generate()` method to enable it.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForCausalLM, AutoTokenizer
 | 
			
		||||
 | 
			
		||||
>>> prompt = "I look forward to"
 | 
			
		||||
>>> checkpoint = "distilgpt2"
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained(checkpoint)
 | 
			
		||||
>>> outputs = model.generate(**inputs)
 | 
			
		||||
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
 | 
			
		||||
['I look forward to seeing you all again!\n\n\n\n\n\n\n\n\n\n\n']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Contrastive search
 | 
			
		||||
 | 
			
		||||
The contrastive search decoding strategy was proposed in the 2022 paper [A Contrastive Framework for Neural Text Generation](https://arxiv.org/abs/2202.06417).
 | 
			
		||||
It demonstrates superior results for generating non-repetitive yet coherent long outputs. To learn how contrastive search
 | 
			
		||||
works, check out [this blog post](https://huggingface.co/blog/introducing-csearch).
 | 
			
		||||
The two main parameters that enable and control the behavior of contrastive search are `penalty_alpha` and `top_k`:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
>>> checkpoint = "gpt2-large"
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained(checkpoint)
 | 
			
		||||
 | 
			
		||||
>>> prompt = "Hugging Face Company is"
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> outputs = model.generate(**inputs, penalty_alpha=0.6, top_k=4, max_new_tokens=100)
 | 
			
		||||
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
 | 
			
		||||
['Hugging Face Company is a family owned and operated business. \
 | 
			
		||||
We pride ourselves on being the best in the business and our customer service is second to none.\
 | 
			
		||||
\n\nIf you have any questions about our products or services, feel free to contact us at any time.\
 | 
			
		||||
 We look forward to hearing from you!']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Multinomial sampling
 | 
			
		||||
 | 
			
		||||
As opposed to greedy search that always chooses a token with the highest probability as the
 | 
			
		||||
next token, multinomial sampling randomly selects the next token based on the probability distribution over the entire
 | 
			
		||||
vocabulary given by the model. Every token with a non-zero probability has a chance of being selected, thus reducing the
 | 
			
		||||
risk of repetition.
 | 
			
		||||
 | 
			
		||||
To enable multinomial sampling set `do_sample=True`.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
>>> checkpoint = "gpt2-large"
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained(checkpoint)
 | 
			
		||||
 | 
			
		||||
>>> prompt = "Today was an amazing day because"
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> outputs = model.generate(**inputs, do_sample=True, max_new_tokens=100)
 | 
			
		||||
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
 | 
			
		||||
['Today was an amazing day because we are now in the final stages of our trip to New York City which was very tough. \
 | 
			
		||||
It is a difficult schedule and a challenging part of the year but still worth it. I have been taking things easier and \
 | 
			
		||||
I feel stronger and more motivated to be out there on their tour. Hopefully, that experience is going to help them with \
 | 
			
		||||
their upcoming events which are currently scheduled in Australia.\n\nWe love that they are here. They want to make a \
 | 
			
		||||
name for themselves and become famous for what they']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Beam-search decoding
 | 
			
		||||
 | 
			
		||||
Unlike greedy search, beam-search decoding keeps several hypotheses at each time step and eventually chooses
 | 
			
		||||
the hypothesis that has the overall highest probability for the entire sequence. This has the advantage of identifying high-probability
 | 
			
		||||
sequences that start with lower probability initial tokens and would've been ignored by the greedy search.
 | 
			
		||||
 | 
			
		||||
To enable this decoding strategy, specify the `num_beams` (aka number of hypotheses to keep track of) that is greater than 1.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForCausalLM, AutoTokenizer
 | 
			
		||||
 | 
			
		||||
>>> prompt = "It is astonishing how one can"
 | 
			
		||||
>>> checkpoint = "gpt2-medium"
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained(checkpoint)
 | 
			
		||||
 | 
			
		||||
>>> outputs = model.generate(**inputs, num_beams=5, max_new_tokens=50)
 | 
			
		||||
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
 | 
			
		||||
['It is astonishing how one can have such a profound impact on the lives of so many people in such a short period of \
 | 
			
		||||
time."\n\nHe added: "I am very proud of the work I have been able to do in the last few years.\n\n"I have']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Beam-search multinomial sampling
 | 
			
		||||
 | 
			
		||||
As the name implies, this decoding strategy combines beam search with multinomial sampling. You need to specify
 | 
			
		||||
the `num_beams` greater than 1, and set `do_sample=True` to use this decoding strategy.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
>>> prompt = "translate English to German: The house is wonderful."
 | 
			
		||||
>>> checkpoint = "t5-small"
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
 | 
			
		||||
 | 
			
		||||
>>> outputs = model.generate(**inputs, num_beams=5, do_sample=True)
 | 
			
		||||
>>> tokenizer.decode(outputs[0], skip_special_tokens=True)
 | 
			
		||||
'Das Haus ist wunderbar.'
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Diverse beam search decoding
 | 
			
		||||
 | 
			
		||||
The diverse beam search decoding strategy is an extension of the beam search strategy that allows for generating a more diverse
 | 
			
		||||
set of beam sequences to choose from. To learn how it works, refer to [Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models](https://arxiv.org/pdf/1610.02424.pdf).
 | 
			
		||||
This approach has two main parameters: `num_beams` and `num_beam_groups`.
 | 
			
		||||
The groups are selected to ensure they are distinct enough compared to the others, and regular beam search is used within each group.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
>>> checkpoint = "google/pegasus-xsum"
 | 
			
		||||
>>> prompt = "The Permaculture Design Principles are a set of universal design principles \
 | 
			
		||||
>>> that can be applied to any location, climate and culture, and they allow us to design \
 | 
			
		||||
>>> the most efficient and sustainable human habitation and food production systems. \
 | 
			
		||||
>>> Permaculture is a design system that encompasses a wide variety of disciplines, such \
 | 
			
		||||
>>> as ecology, landscape design, environmental science and energy conservation, and the \
 | 
			
		||||
>>> Permaculture design principles are drawn from these various disciplines. Each individual \
 | 
			
		||||
>>> design principle itself embodies a complete conceptual framework based on sound \
 | 
			
		||||
>>> scientific principles. When we bring all these separate  principles together, we can \
 | 
			
		||||
>>> create a design system that both looks at whole systems, the parts that these systems \
 | 
			
		||||
>>> consist of, and how those parts interact with each other to create a complex, dynamic, \
 | 
			
		||||
>>> living system. Each design principle serves as a tool that allows us to integrate all \
 | 
			
		||||
>>> the separate parts of a design, referred to as elements, into a functional, synergistic, \
 | 
			
		||||
>>> whole system, where the elements harmoniously interact and work together in the most \
 | 
			
		||||
>>> efficient way possible."
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 | 
			
		||||
>>> inputs = tokenizer(prompt, return_tensors="pt")
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
 | 
			
		||||
 | 
			
		||||
>>> outputs = model.generate(**inputs, num_beams=5, num_beam_groups=5, max_new_tokens=30)
 | 
			
		||||
>>> tokenizer.decode(outputs[0], skip_special_tokens=True)
 | 
			
		||||
'The Design Principles are a set of universal design principles that can be applied to any location, climate and culture, and they allow us to design the most efficient and sustainable human habitation and food production systems.'
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
This guide illustrates the main parameters that enable various decoding strategies. More advanced parameters exist for the
 | 
			
		||||
[`generate`] method, which gives you even further control over the [`generate`] method's behavior.
 | 
			
		||||
For the complete list of the available parameters, refer to the [API documentation](./main_classes/text_generation.mdx).
 | 
			
		||||
@ -12,110 +12,12 @@ specific language governing permissions and limitations under the License.
 | 
			
		||||
 | 
			
		||||
# Glossary
 | 
			
		||||
 | 
			
		||||
## General terms
 | 
			
		||||
This glossary defines general machine learning and 🤗 Transformers terms to help you better understand the
 | 
			
		||||
documentation.
 | 
			
		||||
 | 
			
		||||
- autoencoding models: see MLM
 | 
			
		||||
- autoregressive models: see CLM
 | 
			
		||||
- CLM: causal language modeling, a pretraining task where the model reads the texts in order and has to predict the
 | 
			
		||||
  next word. It's usually done by reading the whole sentence but using a mask inside the model to hide the future
 | 
			
		||||
  tokens at a certain timestep.
 | 
			
		||||
- deep learning: machine learning algorithms which uses neural networks with several layers.
 | 
			
		||||
- MLM: masked language modeling, a pretraining task where the model sees a corrupted version of the texts, usually done
 | 
			
		||||
  by masking some tokens randomly, and has to predict the original text.
 | 
			
		||||
- multimodal: a task that combines texts with another kind of inputs (for instance images).
 | 
			
		||||
- NLG: natural language generation, all tasks related to generating text (for instance talk with transformers,
 | 
			
		||||
  translation).
 | 
			
		||||
- NLP: natural language processing, a generic way to say "deal with texts".
 | 
			
		||||
- NLU: natural language understanding, all tasks related to understanding what is in a text (for instance classifying
 | 
			
		||||
  the whole text, individual words).
 | 
			
		||||
- pretrained model: a model that has been pretrained on some data (for instance all of Wikipedia). Pretraining methods
 | 
			
		||||
  involve a self-supervised objective, which can be reading the text and trying to predict the next word (see CLM) or
 | 
			
		||||
  masking some words and trying to predict them (see MLM).
 | 
			
		||||
- RNN: recurrent neural network, a type of model that uses a loop over a layer to process texts.
 | 
			
		||||
- self-attention: each element of the input finds out which other elements of the input they should attend to.
 | 
			
		||||
- seq2seq or sequence-to-sequence: models that generate a new sequence from an input, like translation models, or
 | 
			
		||||
  summarization models (such as [Bart](model_doc/bart) or [T5](model_doc/t5)).
 | 
			
		||||
- token: a part of a sentence, usually a word, but can also be a subword (non-common words are often split in subwords)
 | 
			
		||||
  or a punctuation symbol.
 | 
			
		||||
- transformer: self-attention based deep learning model architecture.
 | 
			
		||||
## A
 | 
			
		||||
 | 
			
		||||
## Model inputs
 | 
			
		||||
 | 
			
		||||
Every model is different yet bears similarities with the others. Therefore most models use the same inputs, which are
 | 
			
		||||
detailed here alongside usage examples.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Input IDs
 | 
			
		||||
 | 
			
		||||
The input ids are often the only required parameters to be passed to the model as input. *They are token indices,
 | 
			
		||||
numerical representations of tokens building the sequences that will be used as input by the model*.
 | 
			
		||||
 | 
			
		||||
<Youtube id="VFp38yj8h3A"/>
 | 
			
		||||
 | 
			
		||||
Each tokenizer works differently but the underlying mechanism remains the same. Here's an example using the BERT
 | 
			
		||||
tokenizer, which is a [WordPiece](https://arxiv.org/pdf/1609.08144.pdf) tokenizer:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import BertTokenizer
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = BertTokenizer.from_pretrained("bert-base-cased")
 | 
			
		||||
 | 
			
		||||
>>> sequence = "A Titan RTX has 24GB of VRAM"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokenizer takes care of splitting the sequence into tokens available in the tokenizer vocabulary.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> tokenized_sequence = tokenizer.tokenize(sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokens are either words or subwords. Here for instance, "VRAM" wasn't in the model vocabulary, so it's been split
 | 
			
		||||
in "V", "RA" and "M". To indicate those tokens are not separate words but parts of the same word, a double-hash prefix
 | 
			
		||||
is added for "RA" and "M":
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> print(tokenized_sequence)
 | 
			
		||||
['A', 'Titan', 'R', '##T', '##X', 'has', '24', '##GB', 'of', 'V', '##RA', '##M']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
These tokens can then be converted into IDs which are understandable by the model. This can be done by directly feeding
 | 
			
		||||
the sentence to the tokenizer, which leverages the Rust implementation of [🤗 Tokenizers](https://github.com/huggingface/tokenizers) for peak performance.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> inputs = tokenizer(sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokenizer returns a dictionary with all the arguments necessary for its corresponding model to work properly. The
 | 
			
		||||
token indices are under the key "input_ids":
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> encoded_sequence = inputs["input_ids"]
 | 
			
		||||
>>> print(encoded_sequence)
 | 
			
		||||
[101, 138, 18696, 155, 1942, 3190, 1144, 1572, 13745, 1104, 159, 9664, 2107, 102]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Note that the tokenizer automatically adds "special tokens" (if the associated model relies on them) which are special
 | 
			
		||||
IDs the model sometimes uses.
 | 
			
		||||
 | 
			
		||||
If we decode the previous sequence of ids,
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> decoded_sequence = tokenizer.decode(encoded_sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
we will see
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> print(decoded_sequence)
 | 
			
		||||
[CLS] A Titan RTX has 24GB of VRAM [SEP]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
because this is the way a [`BertModel`] is going to expect its inputs.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Attention mask
 | 
			
		||||
### attention mask
 | 
			
		||||
 | 
			
		||||
The attention mask is an optional argument used when batching sequences together.
 | 
			
		||||
 | 
			
		||||
@ -162,26 +64,310 @@ We can see that 0s have been added on the right of the first sentence to make it
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
This can then be converted into a tensor in PyTorch or TensorFlow. The attention mask is a binary tensor indicating the
 | 
			
		||||
position of the padded indices so that the model does not attend to them. For the [`BertTokenizer`],
 | 
			
		||||
`1` indicates a value that should be attended to, while `0` indicates a padded value. This attention mask is
 | 
			
		||||
in the dictionary returned by the tokenizer under the key "attention_mask":
 | 
			
		||||
position of the padded indices so that the model does not attend to them. For the [`BertTokenizer`], `1` indicates a
 | 
			
		||||
value that should be attended to, while `0` indicates a padded value. This attention mask is in the dictionary returned
 | 
			
		||||
by the tokenizer under the key "attention_mask":
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> padded_sequences["attention_mask"]
 | 
			
		||||
[[1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### autoencoding models 
 | 
			
		||||
 | 
			
		||||
see [masked language modeling](#masked-language-modeling)
 | 
			
		||||
 | 
			
		||||
### autoregressive models
 | 
			
		||||
 | 
			
		||||
see [causal language modeling](#causal-language-modeling)
 | 
			
		||||
 | 
			
		||||
## B
 | 
			
		||||
 | 
			
		||||
### backbone
 | 
			
		||||
 | 
			
		||||
The backbone is the network (embeddings and layers) that outputs the raw hidden states or features. It is usually connected to a [head](#head) which accepts the features as its input to make a prediction. For example, [`ViTModel`] is a backbone without a specific head on top. Other models can also use [`VitModel`] as a backbone such as [DPT](model_doc/dpt).
 | 
			
		||||
 | 
			
		||||
## C
 | 
			
		||||
 | 
			
		||||
### channel
 | 
			
		||||
 | 
			
		||||
Color images are made up of some combination of values in three channels - red, green, and blue (RGB) - and grayscale images only have one channel. In 🤗 Transformers, the channel can be the first or last dimension of an image's tensor: [`n_channels`, `height`, `width`] or [`height`, `width`, `n_channels`].
 | 
			
		||||
 | 
			
		||||
### causal language modeling
 | 
			
		||||
 | 
			
		||||
A pretraining task where the model reads the texts in order and has to predict the next word. It's usually done by
 | 
			
		||||
reading the whole sentence but using a mask inside the model to hide the future tokens at a certain timestep.
 | 
			
		||||
 | 
			
		||||
### connectionist temporal classification (CTC)
 | 
			
		||||
 | 
			
		||||
An algorithm which allows a model to learn without knowing exactly how the input and output are aligned; CTC calculates the distribution of all possible outputs for a given input and chooses the most likely output from it. CTC is commonly used in speech recognition tasks because speech doesn't always cleanly align with the transcript for a variety of reasons such as a speaker's different speech rates.
 | 
			
		||||
 | 
			
		||||
### convolution
 | 
			
		||||
 | 
			
		||||
A type of layer in a neural network where the input matrix is multiplied element-wise by a smaller matrix (kernel or filter) and the values are summed up in a new matrix. This is known as a convolutional operation which is repeated over the entire input matrix. Each operation is applied to a different segment of the input matrix. Convolutional neural networks (CNNs) are commonly used in computer vision.
 | 
			
		||||
 | 
			
		||||
## D
 | 
			
		||||
 | 
			
		||||
### decoder input IDs
 | 
			
		||||
 | 
			
		||||
This input is specific to encoder-decoder models, and contains the input IDs that will be fed to the decoder. These
 | 
			
		||||
inputs should be used for sequence to sequence tasks, such as translation or summarization, and are usually built in a
 | 
			
		||||
way specific to each model.
 | 
			
		||||
 | 
			
		||||
Most encoder-decoder models (BART, T5) create their `decoder_input_ids` on their own from the `labels`. In such models,
 | 
			
		||||
passing the `labels` is the preferred way to handle training.
 | 
			
		||||
 | 
			
		||||
Please check each model's docs to see how they handle these input IDs for sequence to sequence training.
 | 
			
		||||
 | 
			
		||||
### deep learning
 | 
			
		||||
 | 
			
		||||
Machine learning algorithms which uses neural networks with several layers.
 | 
			
		||||
 | 
			
		||||
## F
 | 
			
		||||
 | 
			
		||||
### feed forward chunking
 | 
			
		||||
 | 
			
		||||
In each residual attention block in transformers the self-attention layer is usually followed by 2 feed forward layers.
 | 
			
		||||
The intermediate embedding size of the feed forward layers is often bigger than the hidden size of the model (e.g., for
 | 
			
		||||
`bert-base-uncased`).
 | 
			
		||||
 | 
			
		||||
For an input of size `[batch_size, sequence_length]`, the memory required to store the intermediate feed forward
 | 
			
		||||
embeddings `[batch_size, sequence_length, config.intermediate_size]` can account for a large fraction of the memory
 | 
			
		||||
use. The authors of [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451) noticed that since the
 | 
			
		||||
computation is independent of the `sequence_length` dimension, it is mathematically equivalent to compute the output
 | 
			
		||||
embeddings of both feed forward layers `[batch_size, config.hidden_size]_0, ..., [batch_size, config.hidden_size]_n`
 | 
			
		||||
individually and concat them afterward to `[batch_size, sequence_length, config.hidden_size]` with `n =
 | 
			
		||||
sequence_length`, which trades increased computation time against reduced memory use, but yields a mathematically
 | 
			
		||||
**equivalent** result.
 | 
			
		||||
 | 
			
		||||
For models employing the function [`apply_chunking_to_forward`], the `chunk_size` defines the number of output
 | 
			
		||||
embeddings that are computed in parallel and thus defines the trade-off between memory and time complexity. If
 | 
			
		||||
`chunk_size` is set to 0, no feed forward chunking is done.
 | 
			
		||||
 | 
			
		||||
## H
 | 
			
		||||
 | 
			
		||||
### head
 | 
			
		||||
 | 
			
		||||
The model head refers to the last layer of a neural network that accepts the raw hidden states and projects them onto a different dimension. There is a different model head for each task. For example:
 | 
			
		||||
 | 
			
		||||
  * [`GPT2ForSequenceClassification`] is a sequence classification head - a linear layer - on top of the base [`GPT2Model`].
 | 
			
		||||
  * [`ViTForImageClassification`] is an image classification head - a linear layer on top of the final hidden state of the `CLS` token - on top of the base [`ViTModel`].
 | 
			
		||||
  * [`Wav2Vec2ForCTC`] ia a language modeling head with [CTC](#connectionist-temporal-classification-(CTC)) on top of the base [`Wav2Vec2Model`].
 | 
			
		||||
 | 
			
		||||
## I
 | 
			
		||||
 | 
			
		||||
### image patch
 | 
			
		||||
 | 
			
		||||
Vision-based Transformers models split an image into smaller patches which are linearly embedded, and then passed as a sequence to the model. You can find the `patch_size` - or resolution - of the model in it's configuration.
 | 
			
		||||
 | 
			
		||||
### input IDs
 | 
			
		||||
 | 
			
		||||
The input ids are often the only required parameters to be passed to the model as input. They are token indices,
 | 
			
		||||
numerical representations of tokens building the sequences that will be used as input by the model.
 | 
			
		||||
 | 
			
		||||
<Youtube id="VFp38yj8h3A"/>
 | 
			
		||||
 | 
			
		||||
Each tokenizer works differently but the underlying mechanism remains the same. Here's an example using the BERT
 | 
			
		||||
tokenizer, which is a [WordPiece](https://arxiv.org/pdf/1609.08144.pdf) tokenizer:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import BertTokenizer
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = BertTokenizer.from_pretrained("bert-base-cased")
 | 
			
		||||
 | 
			
		||||
>>> sequence = "A Titan RTX has 24GB of VRAM"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokenizer takes care of splitting the sequence into tokens available in the tokenizer vocabulary.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> tokenized_sequence = tokenizer.tokenize(sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokens are either words or subwords. Here for instance, "VRAM" wasn't in the model vocabulary, so it's been split
 | 
			
		||||
in "V", "RA" and "M". To indicate those tokens are not separate words but parts of the same word, a double-hash prefix
 | 
			
		||||
is added for "RA" and "M":
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> print(tokenized_sequence)
 | 
			
		||||
['A', 'Titan', 'R', '##T', '##X', 'has', '24', '##GB', 'of', 'V', '##RA', '##M']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
These tokens can then be converted into IDs which are understandable by the model. This can be done by directly feeding
 | 
			
		||||
the sentence to the tokenizer, which leverages the Rust implementation of [🤗
 | 
			
		||||
Tokenizers](https://github.com/huggingface/tokenizers) for peak performance.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> inputs = tokenizer(sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The tokenizer returns a dictionary with all the arguments necessary for its corresponding model to work properly. The
 | 
			
		||||
token indices are under the key `input_ids`:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> encoded_sequence = inputs["input_ids"]
 | 
			
		||||
>>> print(encoded_sequence)
 | 
			
		||||
[101, 138, 18696, 155, 1942, 3190, 1144, 1572, 13745, 1104, 159, 9664, 2107, 102]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Note that the tokenizer automatically adds "special tokens" (if the associated model relies on them) which are special
 | 
			
		||||
IDs the model sometimes uses.
 | 
			
		||||
 | 
			
		||||
If we decode the previous sequence of ids,
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> decoded_sequence = tokenizer.decode(encoded_sequence)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
we will see
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> print(decoded_sequence)
 | 
			
		||||
[CLS] A Titan RTX has 24GB of VRAM [SEP]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
because this is the way a [`BertModel`] is going to expect its inputs.
 | 
			
		||||
 | 
			
		||||
## L
 | 
			
		||||
 | 
			
		||||
### labels
 | 
			
		||||
 | 
			
		||||
The labels are an optional argument which can be passed in order for the model to compute the loss itself. These labels
 | 
			
		||||
should be the expected prediction of the model: it will use the standard loss in order to compute the loss between its
 | 
			
		||||
predictions and the expected value (the label).
 | 
			
		||||
 | 
			
		||||
These labels are different according to the model head, for example:
 | 
			
		||||
 | 
			
		||||
- For sequence classification models, ([`BertForSequenceClassification`]), the model expects a tensor of dimension
 | 
			
		||||
  `(batch_size)` with each value of the batch corresponding to the expected label of the entire sequence.
 | 
			
		||||
- For token classification models, ([`BertForTokenClassification`]), the model expects a tensor of dimension
 | 
			
		||||
  `(batch_size, seq_length)` with each value corresponding to the expected label of each individual token.
 | 
			
		||||
- For masked language modeling, ([`BertForMaskedLM`]), the model expects a tensor of dimension `(batch_size,
 | 
			
		||||
  seq_length)` with each value corresponding to the expected label of each individual token: the labels being the token
 | 
			
		||||
  ID for the masked token, and values to be ignored for the rest (usually -100).
 | 
			
		||||
- For sequence to sequence tasks, ([`BartForConditionalGeneration`], [`MBartForConditionalGeneration`]), the model
 | 
			
		||||
  expects a tensor of dimension `(batch_size, tgt_seq_length)` with each value corresponding to the target sequences
 | 
			
		||||
  associated with each input sequence. During training, both BART and T5 will make the appropriate
 | 
			
		||||
  `decoder_input_ids` and decoder attention masks internally. They usually do not need to be supplied. This does not
 | 
			
		||||
  apply to models leveraging the Encoder-Decoder framework.
 | 
			
		||||
- For image classification models, ([`ViTForImageClassification`]), the model expects a tensor of dimension
 | 
			
		||||
  `(batch_size)` with each value of the batch corresponding to the expected label of each individual image.
 | 
			
		||||
- For semantic segmentation models, ([`SegformerForSemanticSegmentation`]), the model expects a tensor of dimension
 | 
			
		||||
  `(batch_size, height, width)` with each value of the batch corresponding to the expected label of each individual pixel.
 | 
			
		||||
- For object detection models, ([`DetrForObjectDetection`]), the model expects a list of dictionaries with a
 | 
			
		||||
  `class_labels` and `boxes` key where each value of the batch corresponds to the expected label and number of bounding boxes of each individual image.
 | 
			
		||||
- For automatic speech recognition models, ([`Wav2Vec2ForCTC`]), the model expects a tensor of dimension `(batch_size,
 | 
			
		||||
  target_length)` with each value corresponding to the expected label of each individual token.
 | 
			
		||||
  
 | 
			
		||||
<Tip>
 | 
			
		||||
 | 
			
		||||
Each model's labels may be different, so be sure to always check the documentation of each model for more information
 | 
			
		||||
about their specific labels!
 | 
			
		||||
 | 
			
		||||
</Tip>
 | 
			
		||||
 | 
			
		||||
The base models ([`BertModel`]) do not accept labels, as these are the base transformer models, simply outputting
 | 
			
		||||
features.
 | 
			
		||||
 | 
			
		||||
## M
 | 
			
		||||
 | 
			
		||||
### masked language modeling
 | 
			
		||||
 | 
			
		||||
A pretraining task where the model sees a corrupted version of the texts, usually done by
 | 
			
		||||
masking some tokens randomly, and has to predict the original text.
 | 
			
		||||
 | 
			
		||||
### multimodal
 | 
			
		||||
 | 
			
		||||
A task that combines texts with another kind of inputs (for instance images).
 | 
			
		||||
 | 
			
		||||
## N
 | 
			
		||||
 | 
			
		||||
### Natural language generation
 | 
			
		||||
 | 
			
		||||
All tasks related to generating text (for instance talk with transformers, translation).
 | 
			
		||||
 | 
			
		||||
### Natural language processing
 | 
			
		||||
 | 
			
		||||
A generic way to say "deal with texts".
 | 
			
		||||
 | 
			
		||||
### Natural language understanding
 | 
			
		||||
 | 
			
		||||
All tasks related to understanding what is in a text (for instance classifying the
 | 
			
		||||
whole text, individual words).
 | 
			
		||||
 | 
			
		||||
## P
 | 
			
		||||
 | 
			
		||||
### pixel values
 | 
			
		||||
 | 
			
		||||
A tensor of the numerical representations of an image that is passed to a model. The pixel values have a shape of [`batch_size`, `num_channels`, `height`, `width`], and are generated from an image processor.
 | 
			
		||||
 | 
			
		||||
### pooling
 | 
			
		||||
 | 
			
		||||
An operation that reduces a matrix into a smaller matrix, either by taking the maximum or average of the pooled dimension(s). Pooling layers are commonly found between convolutional layers to downsample the feature representation.
 | 
			
		||||
 | 
			
		||||
### position IDs
 | 
			
		||||
 | 
			
		||||
Contrary to RNNs that have the position of each token embedded within them, transformers are unaware of the position of
 | 
			
		||||
each token. Therefore, the position IDs (`position_ids`) are used by the model to identify each token's position in the
 | 
			
		||||
list of tokens.
 | 
			
		||||
 | 
			
		||||
They are an optional parameter. If no `position_ids` are passed to the model, the IDs are automatically created as
 | 
			
		||||
absolute positional embeddings.
 | 
			
		||||
 | 
			
		||||
Absolute positional embeddings are selected in the range `[0, config.max_position_embeddings - 1]`. Some models use
 | 
			
		||||
other types of positional embeddings, such as sinusoidal position embeddings or relative position embeddings.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Token Type IDs
 | 
			
		||||
### pretrained model
 | 
			
		||||
 | 
			
		||||
A model that has been pretrained on some data (for instance all of Wikipedia). Pretraining methods involve a
 | 
			
		||||
self-supervised objective, which can be reading the text and trying to predict the next word (see [causal language
 | 
			
		||||
modeling](#causal-language-modeling)) or masking some words and trying to predict them (see [masked language
 | 
			
		||||
modeling](#masked-language-modeling)). 
 | 
			
		||||
 | 
			
		||||
  Speech and vision models have their own pretraining objectives. For example, Wav2Vec2 is a speech model pretrained on a contrastive task which requires the model to identify the "true" speech representation from a set of "false" speech representations. On the other hand, BEiT is a vision model pretrained on a masked image modeling task which masks some of the image patches and requires the model to predict the masked patches (similar to the masked language modeling objective).
 | 
			
		||||
 | 
			
		||||
## R
 | 
			
		||||
 | 
			
		||||
### recurrent neural network
 | 
			
		||||
 | 
			
		||||
A type of model that uses a loop over a layer to process texts.
 | 
			
		||||
 | 
			
		||||
## S
 | 
			
		||||
 | 
			
		||||
### sampling rate
 | 
			
		||||
 | 
			
		||||
A measurement in hertz of the number of samples (the audio signal) taken per second. The sampling rate is a result of discretizing a continuous signal such as speech.
 | 
			
		||||
 | 
			
		||||
### self-attention
 | 
			
		||||
 | 
			
		||||
Each element of the input finds out which other elements of the input they should attend to.
 | 
			
		||||
 | 
			
		||||
### sequence-to-sequence (seq2seq)
 | 
			
		||||
 | 
			
		||||
Models that generate a new sequence from an input, like translation models, or summarization models (such as
 | 
			
		||||
[Bart](model_doc/bart) or [T5](model_doc/t5)).
 | 
			
		||||
 | 
			
		||||
### stride
 | 
			
		||||
 | 
			
		||||
In [convolution](#convolution) or [pooling](#pooling), the stride refers to the distance the kernel is moved over a matrix. A stride of 1 means the kernel is moved one pixel over at a time, and a stride of 2 means the kernel is moved two pixels over at a time.
 | 
			
		||||
 | 
			
		||||
## T
 | 
			
		||||
 | 
			
		||||
### token
 | 
			
		||||
 | 
			
		||||
A part of a sentence, usually a word, but can also be a subword (non-common words are often split in subwords) or a
 | 
			
		||||
punctuation symbol.
 | 
			
		||||
 | 
			
		||||
### token Type IDs
 | 
			
		||||
 | 
			
		||||
Some models' purpose is to do classification on pairs of sentences or question answering.
 | 
			
		||||
 | 
			
		||||
<Youtube id="0u3ioSwev3s"/>
 | 
			
		||||
 | 
			
		||||
These require two different sequences to be joined in a single "input_ids" entry, which usually is performed with the
 | 
			
		||||
help of special tokens, such as the classifier (`[CLS]`) and separator (`[SEP]`) tokens. For example, the BERT
 | 
			
		||||
model builds its two sequence input as such:
 | 
			
		||||
help of special tokens, such as the classifier (`[CLS]`) and separator (`[SEP]`) tokens. For example, the BERT model
 | 
			
		||||
builds its two sequence input as such:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> # [CLS] SEQUENCE_A [SEP] SEQUENCE_B [SEP]
 | 
			
		||||
@ -219,81 +405,11 @@ The tokenizer returns this mask as the "token_type_ids" entry:
 | 
			
		||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The first sequence, the "context" used for the question, has all its tokens represented by a `0`, whereas the
 | 
			
		||||
second sequence, corresponding to the "question", has all its tokens represented by a `1`.
 | 
			
		||||
The first sequence, the "context" used for the question, has all its tokens represented by a `0`, whereas the second
 | 
			
		||||
sequence, corresponding to the "question", has all its tokens represented by a `1`.
 | 
			
		||||
 | 
			
		||||
Some models, like [`XLNetModel`] use an additional token represented by a `2`.
 | 
			
		||||
 | 
			
		||||
### transformer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Position IDs
 | 
			
		||||
 | 
			
		||||
Contrary to RNNs that have the position of each token embedded within them, transformers are unaware of the position of
 | 
			
		||||
each token. Therefore, the position IDs (`position_ids`) are used by the model to identify each token's position in
 | 
			
		||||
the list of tokens.
 | 
			
		||||
 | 
			
		||||
They are an optional parameter. If no `position_ids` are passed to the model, the IDs are automatically created as
 | 
			
		||||
absolute positional embeddings.
 | 
			
		||||
 | 
			
		||||
Absolute positional embeddings are selected in the range `[0, config.max_position_embeddings - 1]`. Some models use
 | 
			
		||||
other types of positional embeddings, such as sinusoidal position embeddings or relative position embeddings.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Labels
 | 
			
		||||
 | 
			
		||||
The labels are an optional argument which can be passed in order for the model to compute the loss itself. These labels
 | 
			
		||||
should be the expected prediction of the model: it will use the standard loss in order to compute the loss between its
 | 
			
		||||
predictions and the expected value (the label).
 | 
			
		||||
 | 
			
		||||
These labels are different according to the model head, for example:
 | 
			
		||||
 | 
			
		||||
- For sequence classification models (e.g., [`BertForSequenceClassification`]), the model expects a
 | 
			
		||||
  tensor of dimension `(batch_size)` with each value of the batch corresponding to the expected label of the
 | 
			
		||||
  entire sequence.
 | 
			
		||||
- For token classification models (e.g., [`BertForTokenClassification`]), the model expects a tensor
 | 
			
		||||
  of dimension `(batch_size, seq_length)` with each value corresponding to the expected label of each individual
 | 
			
		||||
  token.
 | 
			
		||||
- For masked language modeling (e.g., [`BertForMaskedLM`]), the model expects a tensor of dimension
 | 
			
		||||
  `(batch_size, seq_length)` with each value corresponding to the expected label of each individual token: the
 | 
			
		||||
  labels being the token ID for the masked token, and values to be ignored for the rest (usually -100).
 | 
			
		||||
- For sequence to sequence tasks,(e.g., [`BartForConditionalGeneration`],
 | 
			
		||||
  [`MBartForConditionalGeneration`]), the model expects a tensor of dimension `(batch_size, tgt_seq_length)` with each value corresponding to the target sequences associated with each input sequence. During
 | 
			
		||||
  training, both *BART* and *T5* will make the appropriate *decoder_input_ids* and decoder attention masks internally.
 | 
			
		||||
  They usually do not need to be supplied. This does not apply to models leveraging the Encoder-Decoder framework. See
 | 
			
		||||
  the documentation of each model for more information on each specific model's labels.
 | 
			
		||||
 | 
			
		||||
The base models (e.g., [`BertModel`]) do not accept labels, as these are the base transformer
 | 
			
		||||
models, simply outputting features.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Decoder input IDs
 | 
			
		||||
 | 
			
		||||
This input is specific to encoder-decoder models, and contains the input IDs that will be fed to the decoder. These
 | 
			
		||||
inputs should be used for sequence to sequence tasks, such as translation or summarization, and are usually built in a
 | 
			
		||||
way specific to each model.
 | 
			
		||||
 | 
			
		||||
Most encoder-decoder models (BART, T5) create their `decoder_input_ids` on their own from the `labels`. In
 | 
			
		||||
such models, passing the `labels` is the preferred way to handle training.
 | 
			
		||||
 | 
			
		||||
Please check each model's docs to see how they handle these input IDs for sequence to sequence training.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Feed Forward Chunking
 | 
			
		||||
 | 
			
		||||
In each residual attention block in transformers the self-attention layer is usually followed by 2 feed forward layers.
 | 
			
		||||
The intermediate embedding size of the feed forward layers is often bigger than the hidden size of the model (e.g., for
 | 
			
		||||
`bert-base-uncased`).
 | 
			
		||||
 | 
			
		||||
For an input of size `[batch_size, sequence_length]`, the memory required to store the intermediate feed forward
 | 
			
		||||
embeddings `[batch_size, sequence_length, config.intermediate_size]` can account for a large fraction of the memory
 | 
			
		||||
use. The authors of [Reformer: The Efficient Transformer](https://arxiv.org/abs/2001.04451) noticed that since the
 | 
			
		||||
computation is independent of the `sequence_length` dimension, it is mathematically equivalent to compute the output
 | 
			
		||||
embeddings of both feed forward layers `[batch_size, config.hidden_size]_0, ..., [batch_size, config.hidden_size]_n`
 | 
			
		||||
individually and concat them afterward to `[batch_size, sequence_length, config.hidden_size]` with `n = sequence_length`, which trades increased computation time against reduced memory use, but yields a mathematically
 | 
			
		||||
**equivalent** result.
 | 
			
		||||
 | 
			
		||||
For models employing the function [`apply_chunking_to_forward`], the `chunk_size` defines the
 | 
			
		||||
number of output embeddings that are computed in parallel and thus defines the trade-off between memory and time
 | 
			
		||||
complexity. If `chunk_size` is set to 0, no feed forward chunking is done.
 | 
			
		||||
Self-attention based deep learning model architecture.
 | 
			
		||||
@ -28,8 +28,8 @@ Join the growing community on the [Hub](https://huggingface.co/models), [forum](
 | 
			
		||||
## If you are looking for custom support from the Hugging Face team
 | 
			
		||||
 | 
			
		||||
<a target="_blank" href="https://huggingface.co/support">
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a><br>
 | 
			
		||||
    <img alt="HuggingFace Expert Acceleration Program" src="https://cdn-media.huggingface.co/marketing/transformers/new-support-improved.png" style="width: 100%; max-width: 600px; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
## Contents
 | 
			
		||||
 | 
			
		||||
@ -50,6 +50,8 @@ The documentation is organized into five sections:
 | 
			
		||||
<!--This list is updated automatically from the README with _make fix-copies_. Do not update manually! -->
 | 
			
		||||
 | 
			
		||||
1. **[ALBERT](model_doc/albert)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.
 | 
			
		||||
1. **[AltCLIP](model_doc/altclip)** (from BAAI) released with the paper [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679) by Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell.
 | 
			
		||||
1. **[Audio Spectrogram Transformer](model_doc/audio-spectrogram-transformer)** (from MIT) released with the paper [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
1. **[BART](model_doc/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
 | 
			
		||||
1. **[BARThez](model_doc/barthez)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis.
 | 
			
		||||
1. **[BARTpho](model_doc/bartpho)** (from VinAI Research) released with the paper [BARTpho: Pre-trained Sequence-to-Sequence Models for Vietnamese](https://arxiv.org/abs/2109.09701) by Nguyen Luong Tran, Duong Minh Le and Dat Quoc Nguyen.
 | 
			
		||||
@ -59,14 +61,19 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[BERTweet](model_doc/bertweet)** (from VinAI Research) released with the paper [BERTweet: A pre-trained language model for English Tweets](https://aclanthology.org/2020.emnlp-demos.2/) by Dat Quoc Nguyen, Thanh Vu and Anh Tuan Nguyen.
 | 
			
		||||
1. **[BigBird-Pegasus](model_doc/bigbird_pegasus)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BigBird-RoBERTa](model_doc/big_bird)** (from Google Research) released with the paper [Big Bird: Transformers for Longer Sequences](https://arxiv.org/abs/2007.14062) by Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, Amr Ahmed.
 | 
			
		||||
1. **[BioGpt](model_doc/biogpt)** (from Microsoft Research AI4Science) released with the paper [BioGPT: generative pre-trained transformer for biomedical text generation and mining](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu.
 | 
			
		||||
1. **[BiT](model_doc/bit)** (from Google AI) released with the paper [Big Transfer (BiT): General Visual Representation Learning](https://arxiv.org/abs/1912.11370) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
1. **[Blenderbot](model_doc/blenderbot)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BlenderbotSmall](model_doc/blenderbot-small)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston.
 | 
			
		||||
1. **[BLOOM](model_doc/bloom)** (from BigScience workshop) released by the [BigSicence Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BLIP](model_doc/blip)** (from Salesforce) released with the paper [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
1. **[BLOOM](model_doc/bloom)** (from BigScience workshop) released by the [BigScience Workshop](https://bigscience.huggingface.co/).
 | 
			
		||||
1. **[BORT](model_doc/bort)** (from Alexa) released with the paper [Optimal Subarchitecture Extraction For BERT](https://arxiv.org/abs/2010.10499) by Adrian de Wynter and Daniel J. Perry.
 | 
			
		||||
1. **[ByT5](model_doc/byt5)** (from Google Research) released with the paper [ByT5: Towards a token-free future with pre-trained byte-to-byte models](https://arxiv.org/abs/2105.13626) by Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel.
 | 
			
		||||
1. **[CamemBERT](model_doc/camembert)** (from Inria/Facebook/Sorbonne) released with the paper [CamemBERT: a Tasty French Language Model](https://arxiv.org/abs/1911.03894) by Louis Martin*, Benjamin Muller*, Pedro Javier Ortiz Suárez*, Yoann Dupont, Laurent Romary, Éric Villemonte de la Clergerie, Djamé Seddah and Benoît Sagot.
 | 
			
		||||
1. **[CANINE](model_doc/canine)** (from Google Research) released with the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) by Jonathan H. Clark, Dan Garrette, Iulia Turc, John Wieting.
 | 
			
		||||
1. **[Chinese-CLIP](model_doc/chinese_clip)** (from OFA-Sys) released with the paper [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
1. **[CLIP](model_doc/clip)** (from OpenAI) released with the paper [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020) by Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, Ilya Sutskever.
 | 
			
		||||
1. **[CLIPSeg](model_doc/clipseg)** (from University of Göttingen) released with the paper [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke and Alexander Ecker.
 | 
			
		||||
1. **[CodeGen](model_doc/codegen)** (from Salesforce) released with the paper [A Conversational Paradigm for Program Synthesis](https://arxiv.org/abs/2203.13474) by Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong.
 | 
			
		||||
1. **[Conditional DETR](model_doc/conditional_detr)** (from Microsoft Research Asia) released with the paper [Conditional DETR for Fast Training Convergence](https://arxiv.org/abs/2108.06152) by Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang.
 | 
			
		||||
1. **[ConvBERT](model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
 | 
			
		||||
@ -82,19 +89,23 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[DeiT](model_doc/deit)** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
 | 
			
		||||
1. **[DETR](model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
 | 
			
		||||
1. **[DialoGPT](model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
 | 
			
		||||
1. **[DiNAT](model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
 | 
			
		||||
1. **[DistilBERT](model_doc/distilbert)** (from HuggingFace), released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same method has been applied to compress GPT2 into [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), RoBERTa into [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation), Multilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation) and a German version of DistilBERT.
 | 
			
		||||
1. **[DiT](model_doc/dit)** (from Microsoft Research) released with the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Junlong Li, Yiheng Xu, Tengchao Lv, Lei Cui, Cha Zhang, Furu Wei.
 | 
			
		||||
1. **[Donut](model_doc/donut)** (from NAVER), released together with the paper [OCR-free Document Understanding Transformer](https://arxiv.org/abs/2111.15664) by Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
 | 
			
		||||
1. **[DPR](model_doc/dpr)** (from Facebook) released with the paper [Dense Passage Retrieval for Open-Domain Question Answering](https://arxiv.org/abs/2004.04906) by Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
 | 
			
		||||
1. **[DPT](master/model_doc/dpt)** (from Intel Labs) released with the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by René Ranftl, Alexey Bochkovskiy, Vladlen Koltun.
 | 
			
		||||
1. **[EfficientFormer](model_doc/efficientformer)** (from Snap Research) released with the paper [EfficientFormer: Vision Transformers at MobileNetSpeed](https://arxiv.org/abs/2206.01191) by Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.
 | 
			
		||||
1. **[ELECTRA](model_doc/electra)** (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. Manning.
 | 
			
		||||
1. **[EncoderDecoder](model_doc/encoder-decoder)** (from Google Research) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
 | 
			
		||||
1. **[ERNIE](model_doc/ernie)** (from Baidu) released with the paper [ERNIE: Enhanced Representation through Knowledge Integration](https://arxiv.org/abs/1904.09223) by Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, Hua Wu.
 | 
			
		||||
1. **[ESM](model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2** was released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[ESM](model_doc/esm)** (from Meta AI) are transformer protein language models.  **ESM-1b** was released with the paper [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C. Lawrence Zitnick, Jerry Ma, and Rob Fergus. **ESM-1v** was released with the paper [Language models enable zero-shot prediction of the effects of mutations on protein function](https://doi.org/10.1101/2021.07.09.450648) by Joshua Meier, Roshan Rao, Robert Verkuil, Jason Liu, Tom Sercu and Alexander Rives. **ESM-2 and ESMFold** were released with the paper [Language models of protein sequences at the scale of evolution enable accurate structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie, Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido, Alexander Rives.
 | 
			
		||||
1. **[FLAN-T5](model_doc/flan-t5)** (from Google AI) released in the repository [google-research/t5x](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) by Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei
 | 
			
		||||
1. **[FlauBERT](model_doc/flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
 | 
			
		||||
1. **[FLAVA](model_doc/flava)** (from Facebook AI) released with the paper [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
 | 
			
		||||
1. **[FNet](model_doc/fnet)** (from Google Research) released with the paper [FNet: Mixing Tokens with Fourier Transforms](https://arxiv.org/abs/2105.03824) by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon.
 | 
			
		||||
1. **[Funnel Transformer](model_doc/funnel)** (from CMU/Google Brain) released with the paper [Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing](https://arxiv.org/abs/2006.03236) by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.
 | 
			
		||||
1. **[GIT](model_doc/git)** (from Microsoft Research) released with the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang.
 | 
			
		||||
1. **[GLPN](model_doc/glpn)** (from KAIST) released with the paper [Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth](https://arxiv.org/abs/2201.07436) by Doyeon Kim, Woonghyun Ga, Pyungwhan Ahn, Donggyu Joo, Sehwan Chun, Junmo Kim.
 | 
			
		||||
1. **[GPT](model_doc/openai-gpt)** (from OpenAI) released with the paper [Improving Language Understanding by Generative Pre-Training](https://blog.openai.com/language-unsupervised/) by Alec Radford, Karthik Narasimhan, Tim Salimans and Ilya Sutskever.
 | 
			
		||||
1. **[GPT Neo](model_doc/gpt_neo)** (from EleutherAI) released in the repository [EleutherAI/gpt-neo](https://github.com/EleutherAI/gpt-neo) by Sid Black, Stella Biderman, Leo Gao, Phil Wang and Connor Leahy.
 | 
			
		||||
@ -102,10 +113,13 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[GPT NeoX Japanese](model_doc/gpt_neox_japanese)** (from ABEJA) released by Shinya Otani, Takayoshi Makabe, Anuj Arora, and Kyo Hattori.
 | 
			
		||||
1. **[GPT-2](model_doc/gpt2)** (from OpenAI) released with the paper [Language Models are Unsupervised Multitask Learners](https://blog.openai.com/better-language-models/) by Alec Radford*, Jeffrey Wu*, Rewon Child, David Luan, Dario Amodei** and Ilya Sutskever**.
 | 
			
		||||
1. **[GPT-J](model_doc/gptj)** (from EleutherAI) released in the repository [kingoflolz/mesh-transformer-jax](https://github.com/kingoflolz/mesh-transformer-jax/) by Ben Wang and Aran Komatsuzaki.
 | 
			
		||||
1. **[GPT-Sw3](model_doc/gpt-sw3)** (from AI-Sweden) released with the paper [Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf) by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman, Fredrik Carlsson, Magnus Sahlgren.
 | 
			
		||||
1. **[Graphormer](model_doc/graphormer)** (from Microsoft) released with the paper [Do Transformers Really Perform Bad for Graph Representation?](https://arxiv.org/abs/2106.05234) by Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, Tie-Yan Liu.
 | 
			
		||||
1. **[GroupViT](model_doc/groupvit)** (from UCSD, NVIDIA) released with the paper [GroupViT: Semantic Segmentation Emerges from Text Supervision](https://arxiv.org/abs/2202.11094) by Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, Xiaolong Wang.
 | 
			
		||||
1. **[Hubert](model_doc/hubert)** (from Facebook) released with the paper [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units](https://arxiv.org/abs/2106.07447) by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, Abdelrahman Mohamed.
 | 
			
		||||
1. **[I-BERT](model_doc/ibert)** (from Berkeley) released with the paper [I-BERT: Integer-only BERT Quantization](https://arxiv.org/abs/2101.01321) by Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer.
 | 
			
		||||
1. **[ImageGPT](model_doc/imagegpt)** (from OpenAI) released with the paper [Generative Pretraining from Pixels](https://openai.com/blog/image-gpt/) by Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, Ilya Sutskever.
 | 
			
		||||
1. **[Jukebox](model_doc/jukebox)** (from OpenAI) released with the paper [Jukebox: A Generative Model for Music](https://arxiv.org/pdf/2005.00341.pdf) by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, Ilya Sutskever.
 | 
			
		||||
1. **[LayoutLM](model_doc/layoutlm)** (from Microsoft Research Asia) released with the paper [LayoutLM: Pre-training of Text and Layout for Document Image Understanding](https://arxiv.org/abs/1912.13318) by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, Ming Zhou.
 | 
			
		||||
1. **[LayoutLMv2](model_doc/layoutlmv2)** (from Microsoft Research Asia) released with the paper [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) by Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou.
 | 
			
		||||
1. **[LayoutLMv3](model_doc/layoutlmv3)** (from Microsoft Research Asia) released with the paper [LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking](https://arxiv.org/abs/2204.08387) by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
 | 
			
		||||
@ -121,6 +135,7 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[M2M100](model_doc/m2m_100)** (from Facebook) released with the paper [Beyond English-Centric Multilingual Machine Translation](https://arxiv.org/abs/2010.11125) by Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, Armand Joulin.
 | 
			
		||||
1. **[MarianMT](model_doc/marian)** Machine translation models trained using [OPUS](http://opus.nlpl.eu/) data by Jörg Tiedemann. The [Marian Framework](https://marian-nmt.github.io/) is being developed by the Microsoft Translator Team.
 | 
			
		||||
1. **[MarkupLM](model_doc/markuplm)** (from Microsoft Research Asia) released with the paper [MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document Understanding](https://arxiv.org/abs/2110.08518) by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei.
 | 
			
		||||
1. **[Mask2Former](model_doc/mask2former)** (from FAIR and UIUC) released with the paper [Masked-attention Mask Transformer for Universal Image Segmentation](https://arxiv.org/abs/2112.01527) by Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, Rohit Girdhar.
 | 
			
		||||
1. **[MaskFormer](model_doc/maskformer)** (from Meta and UIUC) released with the paper [Per-Pixel Classification is Not All You Need for Semantic Segmentation](https://arxiv.org/abs/2107.06278) by Bowen Cheng, Alexander G. Schwing, Alexander Kirillov.
 | 
			
		||||
1. **[mBART](model_doc/mbart)** (from Facebook) released with the paper [Multilingual Denoising Pre-training for Neural Machine Translation](https://arxiv.org/abs/2001.08210) by Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, Luke Zettlemoyer.
 | 
			
		||||
1. **[mBART-50](model_doc/mbart)** (from Facebook) released with the paper [Multilingual Translation with Extensible Multilingual Pretraining and Finetuning](https://arxiv.org/abs/2008.00401) by Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, Angela Fan.
 | 
			
		||||
@ -128,13 +143,17 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[Megatron-GPT2](model_doc/megatron_gpt2)** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism](https://arxiv.org/abs/1909.08053) by Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper and Bryan Catanzaro.
 | 
			
		||||
1. **[mLUKE](model_doc/mluke)** (from Studio Ousia) released with the paper [mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models](https://arxiv.org/abs/2110.08151) by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka.
 | 
			
		||||
1. **[MobileBERT](model_doc/mobilebert)** (from CMU/Google Brain) released with the paper [MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices](https://arxiv.org/abs/2004.02984) by Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou.
 | 
			
		||||
1. **[MobileNetV1](model_doc/mobilenet_v1)** (from Google Inc.) released with the paper [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam.
 | 
			
		||||
1. **[MobileNetV2](model_doc/mobilenet_v2)** (from Google Inc.) released with the paper [MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381) by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.
 | 
			
		||||
1. **[MobileViT](model_doc/mobilevit)** (from Apple) released with the paper [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) by Sachin Mehta and Mohammad Rastegari.
 | 
			
		||||
1. **[MPNet](model_doc/mpnet)** (from Microsoft Research) released with the paper [MPNet: Masked and Permuted Pre-training for Language Understanding](https://arxiv.org/abs/2004.09297) by Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, Tie-Yan Liu.
 | 
			
		||||
1. **[MT5](model_doc/mt5)** (from Google AI) released with the paper [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) by Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel.
 | 
			
		||||
1. **[MVP](model_doc/mvp)** (from RUC AI Box) released with the paper [MVP: Multi-task Supervised Pre-training for Natural Language Generation](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
 | 
			
		||||
1. **[NAT](model_doc/nat)** (from SHI Labs) released with the paper [Neighborhood Attention Transformer](https://arxiv.org/abs/2204.07143) by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.
 | 
			
		||||
1. **[Nezha](model_doc/nezha)** (from Huawei Noah’s Ark Lab) released with the paper [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) by Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu.
 | 
			
		||||
1. **[NLLB](model_doc/nllb)** (from Meta) released with the paper [No Language Left Behind: Scaling Human-Centered Machine Translation](https://arxiv.org/abs/2207.04672) by the NLLB team.
 | 
			
		||||
1. **[Nyströmformer](model_doc/nystromformer)** (from the University of Wisconsin - Madison) released with the paper [Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention](https://arxiv.org/abs/2102.03902) by Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, Vikas Singh.
 | 
			
		||||
1. **[OneFormer](model_doc/oneformer)** (from SHI Labs) released with the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jitesh Jain, Jiachen Li, MangTik Chiu, Ali Hassani, Nikita Orlov, Humphrey Shi.
 | 
			
		||||
1. **[OPT](master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
 | 
			
		||||
1. **[OWL-ViT](model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://arxiv.org/abs/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.
 | 
			
		||||
1. **[Pegasus](model_doc/pegasus)** (from Google) released with the paper [PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization](https://arxiv.org/abs/1912.08777) by Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu.
 | 
			
		||||
@ -152,6 +171,8 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[RemBERT](model_doc/rembert)** (from Google Research) released with the paper [Rethinking embedding coupling in pre-trained language models](https://arxiv.org/abs/2010.12821) by Hyung Won Chung, Thibault Févry, Henry Tsai, M. Johnson, Sebastian Ruder.
 | 
			
		||||
1. **[ResNet](model_doc/resnet)** (from Microsoft Research) released with the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
 | 
			
		||||
1. **[RoBERTa](model_doc/roberta)** (from Facebook), released together with the paper [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://arxiv.org/abs/1907.11692) by Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov.
 | 
			
		||||
1. **[RoBERTa-PreLayerNorm](model_doc/roberta-prelayernorm)** (from Facebook) released with the paper [fairseq: A Fast, Extensible Toolkit for Sequence Modeling](https://arxiv.org/abs/1904.01038) by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
 | 
			
		||||
1. **[RoCBert](model_doc/roc_bert)** (from WeChatAI) released with the paper [RoCBert: Robust Chinese Bert with Multimodal Contrastive Pretraining](https://aclanthology.org/2022.acl-long.65.pdf) by HuiSu, WeiweiShi, XiaoyuShen, XiaoZhou, TuoJi, JiaruiFang, JieZhou.
 | 
			
		||||
1. **[RoFormer](model_doc/roformer)** (from ZhuiyiTechnology), released together with the paper [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://arxiv.org/abs/2104.09864) by Jianlin Su and Yu Lu and Shengfeng Pan and Bo Wen and Yunfeng Liu.
 | 
			
		||||
1. **[SegFormer](model_doc/segformer)** (from NVIDIA) released with the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping Luo.
 | 
			
		||||
1. **[SEW](model_doc/sew)** (from ASAPP) released with the paper [Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition](https://arxiv.org/abs/2109.06870) by Felix Wu, Kwangyoun Kim, Jing Pan, Kyu Han, Kilian Q. Weinberger, Yoav Artzi.
 | 
			
		||||
@ -162,22 +183,28 @@ The documentation is organized into five sections:
 | 
			
		||||
1. **[SqueezeBERT](model_doc/squeezebert)** (from Berkeley) released with the paper [SqueezeBERT: What can computer vision teach NLP about efficient neural networks?](https://arxiv.org/abs/2006.11316) by Forrest N. Iandola, Albert E. Shaw, Ravi Krishna, and Kurt W. Keutzer.
 | 
			
		||||
1. **[Swin Transformer](model_doc/swin)** (from Microsoft) released with the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030) by Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo.
 | 
			
		||||
1. **[Swin Transformer V2](model_doc/swinv2)** (from Microsoft) released with the paper [Swin Transformer V2: Scaling Up Capacity and Resolution](https://arxiv.org/abs/2111.09883) by Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, Furu Wei, Baining Guo.
 | 
			
		||||
1. **[Swin2SR](model_doc/swin2sr)** (from University of Würzburg) released with the paper [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://arxiv.org/abs/2209.11345) by Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte.
 | 
			
		||||
1. **[SwitchTransformers](model_doc/switch_transformers)** (from Google) released with the paper [Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https://arxiv.org/abs/2101.03961) by William Fedus, Barret Zoph, Noam Shazeer.
 | 
			
		||||
1. **[T5](model_doc/t5)** (from Google AI) released with the paper [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://arxiv.org/abs/1910.10683) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[T5v1.1](model_doc/t5v1.1)** (from Google AI) released in the repository [google-research/text-to-text-transfer-transformer](https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511) by Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu.
 | 
			
		||||
1. **[Table Transformer](model_doc/table-transformer)** (from Microsoft Research) released with the paper [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) by Brandon Smock, Rohith Pesala, Robin Abraham.
 | 
			
		||||
1. **[TAPAS](model_doc/tapas)** (from Google AI) released with the paper [TAPAS: Weakly Supervised Table Parsing via Pre-training](https://arxiv.org/abs/2004.02349) by Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno and Julian Martin Eisenschlos.
 | 
			
		||||
1. **[TAPEX](model_doc/tapex)** (from Microsoft Research) released with the paper [TAPEX: Table Pre-training via Learning a Neural SQL Executor](https://arxiv.org/abs/2107.07653) by Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou.
 | 
			
		||||
1. **[Time Series Transformer](model_doc/time_series_transformer)**  (from HuggingFace).
 | 
			
		||||
1. **[Time Series Transformer](model_doc/time_series_transformer)** (from HuggingFace).
 | 
			
		||||
1. **[TimeSformer](model_doc/timesformer)** (from Facebook) released with the paper [Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Gedas Bertasius, Heng Wang, Lorenzo Torresani.
 | 
			
		||||
1. **[Trajectory Transformer](model_doc/trajectory_transformers)** (from the University of California at Berkeley) released with the paper [Offline Reinforcement Learning as One Big Sequence Modeling Problem](https://arxiv.org/abs/2106.02039) by Michael Janner, Qiyang Li, Sergey Levine
 | 
			
		||||
1. **[Transformer-XL](model_doc/transfo-xl)** (from Google/CMU) released with the paper [Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context](https://arxiv.org/abs/1901.02860) by Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov.
 | 
			
		||||
1. **[TrOCR](model_doc/trocr)** (from Microsoft), released together with the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei Florencio, Cha Zhang, Zhoujun Li, Furu Wei.
 | 
			
		||||
1. **[UL2](model_doc/ul2)** (from Google Research) released with the paper [Unifying Language Learning Paradigms](https://arxiv.org/abs/2205.05131v1) by Yi Tay, Mostafa Dehghani, Vinh Q. Tran, Xavier Garcia, Dara Bahri, Tal Schuster, Huaixiu Steven Zheng, Neil Houlsby, Donald Metzler
 | 
			
		||||
1. **[UniSpeech](model_doc/unispeech)** (from Microsoft Research) released with the paper [UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data](https://arxiv.org/abs/2101.07597) by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael Zeng, Xuedong Huang.
 | 
			
		||||
1. **[UniSpeechSat](model_doc/unispeech-sat)** (from Microsoft Research) released with the paper [UNISPEECH-SAT: UNIVERSAL SPEECH REPRESENTATION LEARNING WITH SPEAKER AWARE PRE-TRAINING](https://arxiv.org/abs/2110.05752) by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen, Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu.
 | 
			
		||||
1. **[UPerNet](model_doc/upernet)** (from Peking University) released with the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun.
 | 
			
		||||
1. **[VAN](model_doc/van)** (from Tsinghua University and Nankai University) released with the paper [Visual Attention Network](https://arxiv.org/abs/2202.09741) by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu.
 | 
			
		||||
1. **[VideoMAE](model_doc/videomae)** (from Multimedia Computing Group, Nanjing University) released with the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
 | 
			
		||||
1. **[ViLT](model_doc/vilt)** (from NAVER AI Lab/Kakao Enterprise/Kakao Brain) released with the paper [ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision](https://arxiv.org/abs/2102.03334) by Wonjae Kim, Bokyung Son, Ildoo Kim.
 | 
			
		||||
1. **[Vision Transformer (ViT)](model_doc/vit)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[VisualBERT](model_doc/visual_bert)** (from UCLA NLP) released with the paper [VisualBERT: A Simple and Performant Baseline for Vision and Language](https://arxiv.org/pdf/1908.03557) by Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, Kai-Wei Chang.
 | 
			
		||||
1. **[ViT Hybrid](model_doc/vit_hybrid)** (from Google AI) released with the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, Neil Houlsby.
 | 
			
		||||
1. **[ViTMAE](model_doc/vit_mae)** (from Meta AI) released with the paper [Masked Autoencoders Are Scalable Vision Learners](https://arxiv.org/abs/2111.06377) by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, Ross Girshick.
 | 
			
		||||
1. **[ViTMSN](model_doc/vit_msn)** (from Meta AI) released with the paper [Masked Siamese Networks for Label-Efficient Learning](https://arxiv.org/abs/2204.07141) by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes, Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas.
 | 
			
		||||
1. **[Wav2Vec2](model_doc/wav2vec2)** (from Facebook AI) released with the paper [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477) by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.
 | 
			
		||||
@ -206,141 +233,168 @@ Flax), PyTorch, and/or TensorFlow.
 | 
			
		||||
 | 
			
		||||
<!--This table is updated automatically from the auto modules with _make fix-copies_. Do not update manually!-->
 | 
			
		||||
 | 
			
		||||
|            Model            | Tokenizer slow | Tokenizer fast | PyTorch support | TensorFlow support | Flax Support |
 | 
			
		||||
|:---------------------------:|:--------------:|:--------------:|:---------------:|:------------------:|:------------:|
 | 
			
		||||
|           ALBERT            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            BART             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            BEiT             |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|            BERT             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|       Bert Generation       |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           BigBird           |       ✅       |       ✅       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|       BigBird-Pegasus       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         Blenderbot          |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|       BlenderbotSmall       |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            BLOOM            |       ❌       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          CamemBERT          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           CANINE            |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            CLIP             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           CodeGen           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|      Conditional DETR       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          ConvBERT           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          ConvNeXT           |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            CTRL             |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             CvT             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|        Data2VecAudio        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        Data2VecText         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       Data2VecVision        |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           DeBERTa           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|         DeBERTa-v2          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|    Decision Transformer     |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       Deformable DETR       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            DeiT             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            DETR             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         DistilBERT          |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          DonutSwin          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             DPR             |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             DPT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           ELECTRA           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|       Encoder decoder       |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            ERNIE            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             ESM             |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
| FairSeq Machine-Translation |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          FlauBERT           |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            FLAVA            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            FNet             |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|     Funnel Transformer      |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            GLPN             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           GPT Neo           |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|          GPT NeoX           |       ❌       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|      GPT NeoX Japanese      |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            GPT-J            |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          GroupViT           |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           Hubert            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           I-BERT            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          ImageGPT           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          LayoutLM           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|         LayoutLMv2          |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         LayoutLMv3          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             LED             |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            LeViT            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            LiLT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         Longformer          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           LongT5            |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|            LUKE             |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           LXMERT            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           M-CTC-T           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           M2M100            |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Marian            |       ✅       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          MarkupLM           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         MaskFormer          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            mBART            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|        Megatron-BERT        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         MobileBERT          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          MobileViT          |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            MPNet            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             MT5             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             MVP             |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Nezha            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        Nyströmformer        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         OpenAI GPT          |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|        OpenAI GPT-2         |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             OPT             |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           OWL-ViT           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Pegasus           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          PEGASUS-X          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Perceiver          |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           PLBart            |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         PoolFormer          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         ProphetNet          |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           QDQBert           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             RAG             |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            REALM            |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Reformer           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           RegNet            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           RemBERT           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           ResNet            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          RetriBERT          |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           RoBERTa           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          RoFormer           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          SegFormer          |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             SEW             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            SEW-D            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|   Speech Encoder decoder    |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|         Speech2Text         |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|        Speech2Text2         |       ✅       |       ❌       |       ❌        |         ❌         |      ❌      |
 | 
			
		||||
|          Splinter           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         SqueezeBERT         |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|      Swin Transformer       |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|     Swin Transformer V2     |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             T5              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            TAPAS            |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|   Time Series Transformer   |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|   Trajectory Transformer    |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       Transformer-XL        |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            TrOCR            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          UniSpeech          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        UniSpeechSat         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             VAN             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          VideoMAE           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            ViLT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|   Vision Encoder decoder    |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|    VisionTextDualEncoder    |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|         VisualBERT          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             ViT             |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           ViTMAE            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           ViTMSN            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Wav2Vec2           |       ✅       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|     Wav2Vec2-Conformer      |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            WavLM            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Whisper           |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           X-CLIP            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            XGLM             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             XLM             |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|       XLM-ProphetNet        |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         XLM-RoBERTa         |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|       XLM-RoBERTa-XL        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            XLNet            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            YOLOS            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            YOSO             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             Model             | Tokenizer slow | Tokenizer fast | PyTorch support | TensorFlow support | Flax Support |
 | 
			
		||||
|:-----------------------------:|:--------------:|:--------------:|:---------------:|:------------------:|:------------:|
 | 
			
		||||
|            ALBERT             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            AltCLIP            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
| Audio Spectrogram Transformer |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             BART              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             BEiT              |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|             BERT              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|        Bert Generation        |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            BigBird            |       ✅       |       ✅       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|        BigBird-Pegasus        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            BioGpt             |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              BiT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Blenderbot           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|        BlenderbotSmall        |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             BLIP              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             BLOOM             |       ❌       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           CamemBERT           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            CANINE             |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         Chinese-CLIP          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             CLIP              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            CLIPSeg            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            CodeGen            |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       Conditional DETR        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           ConvBERT            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           ConvNeXT            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             CTRL              |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              CvT              |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|         Data2VecAudio         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         Data2VecText          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        Data2VecVision         |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            DeBERTa            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          DeBERTa-v2           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|     Decision Transformer      |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        Deformable DETR        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             DeiT              |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             DETR              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             DiNAT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          DistilBERT           |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           DonutSwin           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              DPR              |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              DPT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        EfficientFormer        |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            ELECTRA            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|        Encoder decoder        |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|             ERNIE             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              ESM              |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|  FairSeq Machine-Translation  |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           FlauBERT            |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             FLAVA             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             FNet              |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|      Funnel Transformer       |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              GIT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             GLPN              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            GPT Neo            |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|           GPT NeoX            |       ❌       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       GPT NeoX Japanese       |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             GPT-J             |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            GPT-Sw3            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          Graphormer           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           GroupViT            |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            Hubert             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            I-BERT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           ImageGPT            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Jukebox            |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           LayoutLM            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          LayoutLMv2           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          LayoutLMv3           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              LED              |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             LeViT             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             LiLT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Longformer           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            LongT5             |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|             LUKE              |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            LXMERT             |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            M-CTC-T            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            M2M100             |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Marian             |       ✅       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           MarkupLM            |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          Mask2Former          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          MaskFormer           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        MaskFormerSwin         |       ❌       |       ❌       |       ❌        |         ❌         |      ❌      |
 | 
			
		||||
|             mBART             |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|         Megatron-BERT         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          MobileBERT           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|          MobileNetV1          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          MobileNetV2          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           MobileViT           |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             MPNet             |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              MT5              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|              MVP              |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              NAT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             Nezha             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         Nyströmformer         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           OneFormer           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          OpenAI GPT           |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|         OpenAI GPT-2          |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|              OPT              |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            OWL-ViT            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Pegasus            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           PEGASUS-X           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Perceiver           |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            PLBart             |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          PoolFormer           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          ProphetNet           |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            QDQBert            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              RAG              |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             REALM             |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Reformer            |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            RegNet             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            RemBERT            |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            ResNet             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|           RetriBERT           |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            RoBERTa            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|     RoBERTa-PreLayerNorm      |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|            RoCBert            |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           RoFormer            |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|           SegFormer           |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|              SEW              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             SEW-D             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|    Speech Encoder decoder     |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|          Speech2Text          |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|         Speech2Text2          |       ✅       |       ❌       |       ❌        |         ❌         |      ❌      |
 | 
			
		||||
|           Splinter            |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          SqueezeBERT          |       ✅       |       ✅       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|       Swin Transformer        |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|      Swin Transformer V2      |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Swin2SR            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|      SwitchTransformers       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              T5               |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|       Table Transformer       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             TAPAS             |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|    Time Series Transformer    |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          TimeSformer          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|    Trajectory Transformer     |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|        Transformer-XL         |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             TrOCR             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           UniSpeech           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|         UniSpeechSat          |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            UPerNet            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              VAN              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           VideoMAE            |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             ViLT              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|    Vision Encoder decoder     |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|     VisionTextDualEncoder     |       ❌       |       ❌       |       ✅        |         ❌         |      ✅      |
 | 
			
		||||
|          VisualBERT           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|              ViT              |       ❌       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|          ViT Hybrid           |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            ViTMAE             |       ❌       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            ViTMSN             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|           Wav2Vec2            |       ✅       |       ❌       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|      Wav2Vec2-Conformer       |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             WavLM             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|            Whisper            |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|            X-CLIP             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             XGLM              |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|              XLM              |       ✅       |       ❌       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|        XLM-ProphetNet         |       ✅       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|          XLM-RoBERTa          |       ✅       |       ✅       |       ✅        |         ✅         |      ✅      |
 | 
			
		||||
|        XLM-RoBERTa-XL         |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             XLNet             |       ✅       |       ✅       |       ✅        |         ✅         |      ❌      |
 | 
			
		||||
|             YOLOS             |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
|             YOSO              |       ❌       |       ❌       |       ✅        |         ❌         |      ❌      |
 | 
			
		||||
 | 
			
		||||
<!-- End table-->
 | 
			
		||||
<!-- End table-->
 | 
			
		||||
@ -12,21 +12,22 @@ specific language governing permissions and limitations under the License.
 | 
			
		||||
 | 
			
		||||
# Utilities for Generation
 | 
			
		||||
 | 
			
		||||
This page lists all the utility functions used by [`~generation_utils.GenerationMixin.generate`],
 | 
			
		||||
[`~generation_utils.GenerationMixin.greedy_search`],
 | 
			
		||||
[`~generation_utils.GenerationMixin.sample`],
 | 
			
		||||
[`~generation_utils.GenerationMixin.beam_search`],
 | 
			
		||||
[`~generation_utils.GenerationMixin.beam_sample`],
 | 
			
		||||
[`~generation_utils.GenerationMixin.group_beam_search`], and
 | 
			
		||||
[`~generation_utils.GenerationMixin.constrained_beam_search`].
 | 
			
		||||
This page lists all the utility functions used by [`~generation.GenerationMixin.generate`],
 | 
			
		||||
[`~generation.GenerationMixin.greedy_search`],
 | 
			
		||||
[`~generation.GenerationMixin.contrastive_search`],
 | 
			
		||||
[`~generation.GenerationMixin.sample`],
 | 
			
		||||
[`~generation.GenerationMixin.beam_search`],
 | 
			
		||||
[`~generation.GenerationMixin.beam_sample`],
 | 
			
		||||
[`~generation.GenerationMixin.group_beam_search`], and
 | 
			
		||||
[`~generation.GenerationMixin.constrained_beam_search`].
 | 
			
		||||
 | 
			
		||||
Most of those are only useful if you are studying the code of the generate methods in the library.
 | 
			
		||||
 | 
			
		||||
## Generate Outputs
 | 
			
		||||
 | 
			
		||||
The output of [`~generation_utils.GenerationMixin.generate`] is an instance of a subclass of
 | 
			
		||||
The output of [`~generation.GenerationMixin.generate`] is an instance of a subclass of
 | 
			
		||||
[`~utils.ModelOutput`]. This output is a data structure containing all the information returned
 | 
			
		||||
by [`~generation_utils.GenerationMixin.generate`], but that can also be used as tuple or dictionary.
 | 
			
		||||
by [`~generation.GenerationMixin.generate`], but that can also be used as tuple or dictionary.
 | 
			
		||||
 | 
			
		||||
Here's an example:
 | 
			
		||||
 | 
			
		||||
@ -40,7 +41,7 @@ inputs = tokenizer("Hello, my dog is cute and ", return_tensors="pt")
 | 
			
		||||
generation_output = model.generate(**inputs, return_dict_in_generate=True, output_scores=True)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The `generation_output` object is a [`~generation_utils.GreedySearchDecoderOnlyOutput`], as we can
 | 
			
		||||
The `generation_output` object is a [`~generation.GreedySearchDecoderOnlyOutput`], as we can
 | 
			
		||||
see in the documentation of that class below, it means it has the following attributes:
 | 
			
		||||
 | 
			
		||||
- `sequences`: the generated sequences of tokens
 | 
			
		||||
@ -72,31 +73,31 @@ We document here all output types.
 | 
			
		||||
 | 
			
		||||
### GreedySearchOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.GreedySearchDecoderOnlyOutput
 | 
			
		||||
[[autodoc]] generation.GreedySearchDecoderOnlyOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.GreedySearchEncoderDecoderOutput
 | 
			
		||||
[[autodoc]] generation.GreedySearchEncoderDecoderOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_flax_utils.FlaxGreedySearchOutput
 | 
			
		||||
[[autodoc]] generation.FlaxGreedySearchOutput
 | 
			
		||||
 | 
			
		||||
### SampleOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.SampleDecoderOnlyOutput
 | 
			
		||||
[[autodoc]] generation.SampleDecoderOnlyOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.SampleEncoderDecoderOutput
 | 
			
		||||
[[autodoc]] generation.SampleEncoderDecoderOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_flax_utils.FlaxSampleOutput
 | 
			
		||||
[[autodoc]] generation.FlaxSampleOutput
 | 
			
		||||
 | 
			
		||||
### BeamSearchOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.BeamSearchDecoderOnlyOutput
 | 
			
		||||
[[autodoc]] generation.BeamSearchDecoderOnlyOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.BeamSearchEncoderDecoderOutput
 | 
			
		||||
[[autodoc]] generation.BeamSearchEncoderDecoderOutput
 | 
			
		||||
 | 
			
		||||
### BeamSampleOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.BeamSampleDecoderOnlyOutput
 | 
			
		||||
[[autodoc]] generation.BeamSampleDecoderOnlyOutput
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.BeamSampleEncoderDecoderOutput
 | 
			
		||||
[[autodoc]] generation.BeamSampleEncoderDecoderOutput
 | 
			
		||||
 | 
			
		||||
## LogitsProcessor
 | 
			
		||||
 | 
			
		||||
@ -115,6 +116,9 @@ generation.
 | 
			
		||||
[[autodoc]] MinLengthLogitsProcessor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
[[autodoc]] MinNewTokensLengthLogitsProcessor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TemperatureLogitsWarper
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -19,14 +19,26 @@ Most of those are only useful if you are studying the code of the image processo
 | 
			
		||||
 | 
			
		||||
## Image Transformations
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.center_crop
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.center_to_corners_format
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.corners_to_center_format
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.id_to_rgb
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.normalize
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.pad
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.rgb_to_id
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.rescale
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.resize
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_transforms.to_pil_image
 | 
			
		||||
 | 
			
		||||
## ImageProcessorMixin
 | 
			
		||||
## ImageProcessingMixin
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_processing_utils.ImageProcessorMixin
 | 
			
		||||
[[autodoc]] image_processing_utils.ImageProcessingMixin
 | 
			
		||||
 | 
			
		||||
@ -37,6 +37,7 @@ By default a [`Trainer`] will use the following callbacks:
 | 
			
		||||
  installed.
 | 
			
		||||
- [`~integrations.CodeCarbonCallback`] if [codecarbon](https://pypi.org/project/codecarbon/) is
 | 
			
		||||
  installed.
 | 
			
		||||
- [`~integrations.ClearMLCallback`] if [clearml](https://github.com/allegroai/clearml) is installed.
 | 
			
		||||
 | 
			
		||||
The main class that implements callbacks is [`TrainerCallback`]. It gets the
 | 
			
		||||
[`TrainingArguments`] used to instantiate the [`Trainer`], can access that
 | 
			
		||||
@ -73,6 +74,8 @@ Here is the list of the available [`TrainerCallback`] in the library:
 | 
			
		||||
 | 
			
		||||
[[autodoc]] integrations.NeptuneCallback
 | 
			
		||||
 | 
			
		||||
[[autodoc]] integrations.ClearMLCallback
 | 
			
		||||
 | 
			
		||||
## TrainerCallback
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TrainerCallback
 | 
			
		||||
 | 
			
		||||
@ -1499,7 +1499,7 @@ fp32_model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
 | 
			
		||||
 | 
			
		||||
<Tip>
 | 
			
		||||
 | 
			
		||||
Note, that once `load_state_dict_from_zero_checkpoint` was run, the `model` will no longer be useable in the
 | 
			
		||||
Note, that once `load_state_dict_from_zero_checkpoint` was run, the `model` will no longer be usable in the
 | 
			
		||||
DeepSpeed context of the same application. i.e. you will need to re-initialize the deepspeed engine, since
 | 
			
		||||
`model.load_state_dict(state_dict)` will remove all the DeepSpeed magic from it. So do this only at the very end
 | 
			
		||||
of the training.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								docs/source/en/main_classes/image_processor.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								docs/source/en/main_classes/image_processor.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Image Processor
 | 
			
		||||
 | 
			
		||||
An image processor is in charge of preparing input features for vision models and post processing their outputs. This includes transformations such as resizing, normalization, and conversion to PyTorch, TensorFlow, Flax and Numpy tensors. It may also include model specific post-processing such as converting logits to segmentation masks.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## ImageProcessingMixin
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_processing_utils.ImageProcessingMixin
 | 
			
		||||
    - from_pretrained
 | 
			
		||||
    - save_pretrained
 | 
			
		||||
 | 
			
		||||
## BatchFeature
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BatchFeature
 | 
			
		||||
 | 
			
		||||
## BaseImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] image_processing_utils.BaseImageProcessor
 | 
			
		||||
@ -25,9 +25,9 @@ are common among all the models to:
 | 
			
		||||
 | 
			
		||||
The other methods that are common to each model are defined in [`~modeling_utils.ModuleUtilsMixin`]
 | 
			
		||||
(for the PyTorch models) and [`~modeling_tf_utils.TFModuleUtilsMixin`] (for the TensorFlow models) or
 | 
			
		||||
for text generation, [`~generation_utils.GenerationMixin`] (for the PyTorch models),
 | 
			
		||||
[`~generation_tf_utils.TFGenerationMixin`] (for the TensorFlow models) and
 | 
			
		||||
[`~generation_flax_utils.FlaxGenerationMixin`] (for the Flax/JAX models).
 | 
			
		||||
for text generation, [`~generation.GenerationMixin`] (for the PyTorch models),
 | 
			
		||||
[`~generation.TFGenerationMixin`] (for the TensorFlow models) and
 | 
			
		||||
[`~generation.FlaxGenerationMixin`] (for the Flax/JAX models).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## PreTrainedModel
 | 
			
		||||
 | 
			
		||||
@ -20,31 +20,7 @@ Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction an
 | 
			
		||||
There are two categories of pipeline abstractions to be aware about:
 | 
			
		||||
 | 
			
		||||
- The [`pipeline`] which is the most powerful object encapsulating all other pipelines.
 | 
			
		||||
- The other task-specific pipelines:
 | 
			
		||||
 | 
			
		||||
  - [`AudioClassificationPipeline`]
 | 
			
		||||
  - [`AutomaticSpeechRecognitionPipeline`]
 | 
			
		||||
  - [`ConversationalPipeline`]
 | 
			
		||||
  - [`DepthEstimationPipeline`]
 | 
			
		||||
  - [`DocumentQuestionAnsweringPipeline`]
 | 
			
		||||
  - [`FeatureExtractionPipeline`]
 | 
			
		||||
  - [`FillMaskPipeline`]
 | 
			
		||||
  - [`ImageClassificationPipeline`]
 | 
			
		||||
  - [`ImageSegmentationPipeline`]
 | 
			
		||||
  - [`ImageToTextPipeline`]
 | 
			
		||||
  - [`ObjectDetectionPipeline`]
 | 
			
		||||
  - [`QuestionAnsweringPipeline`]
 | 
			
		||||
  - [`SummarizationPipeline`]
 | 
			
		||||
  - [`TableQuestionAnsweringPipeline`]
 | 
			
		||||
  - [`TextClassificationPipeline`]
 | 
			
		||||
  - [`TextGenerationPipeline`]
 | 
			
		||||
  - [`Text2TextGenerationPipeline`]
 | 
			
		||||
  - [`TokenClassificationPipeline`]
 | 
			
		||||
  - [`TranslationPipeline`]
 | 
			
		||||
  - [`VisualQuestionAnsweringPipeline`]
 | 
			
		||||
  - [`ZeroShotClassificationPipeline`]
 | 
			
		||||
  - [`ZeroShotImageClassificationPipeline`]
 | 
			
		||||
  - [`ZeroShotObjectDetectionPipeline`]
 | 
			
		||||
- Task-specific pipelines are available for [audio](#audio), [computer vision](#computer-vision), [natural language processing](#natural-language-processing), and [multimodal](#multimodal) tasks.
 | 
			
		||||
 | 
			
		||||
## The pipeline abstraction
 | 
			
		||||
 | 
			
		||||
@ -65,19 +41,19 @@ the hub already defines it:
 | 
			
		||||
```python
 | 
			
		||||
>>> pipe = pipeline(model="roberta-large-mnli")
 | 
			
		||||
>>> pipe("This restaurant is awesome")
 | 
			
		||||
[{'label': 'POSITIVE', 'score': 0.9998743534088135}]
 | 
			
		||||
[{'label': 'NEUTRAL', 'score': 0.7313136458396912}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
To call a pipeline on many items, you can either call with a *list*.
 | 
			
		||||
To call a pipeline on many items, you can call it with a *list*.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> pipe = pipeline("text-classification")
 | 
			
		||||
>>> pipe(["This restaurant is awesome", "This restaurant is aweful"])
 | 
			
		||||
>>> pipe(["This restaurant is awesome", "This restaurant is awful"])
 | 
			
		||||
[{'label': 'POSITIVE', 'score': 0.9998743534088135},
 | 
			
		||||
 {'label': 'NEGATIVE', 'score': 0.9996669292449951}]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
To iterate of full datasets it is recommended to use a `dataset` directly. This means you don't need to allocate
 | 
			
		||||
To iterate over full datasets it is recommended to use a `dataset` directly. This means you don't need to allocate
 | 
			
		||||
the whole dataset at once, nor do you need to do batching yourself. This should work just as fast as custom loops on
 | 
			
		||||
GPU. If it doesn't don't hesitate to create an issue.
 | 
			
		||||
 | 
			
		||||
@ -91,7 +67,7 @@ pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-96
 | 
			
		||||
dataset = datasets.load_dataset("superb", name="asr", split="test")
 | 
			
		||||
 | 
			
		||||
# KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item
 | 
			
		||||
# as we're not interested in the *target* part of the dataset.
 | 
			
		||||
# as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset
 | 
			
		||||
for out in tqdm(pipe(KeyDataset(dataset, "file"))):
 | 
			
		||||
    print(out)
 | 
			
		||||
    # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
 | 
			
		||||
@ -322,8 +298,9 @@ That should enable you to do all the custom code you want.
 | 
			
		||||
 | 
			
		||||
[Implementing a new pipeline](../add_new_pipeline)
 | 
			
		||||
 | 
			
		||||
## The task specific pipelines
 | 
			
		||||
## Audio
 | 
			
		||||
 | 
			
		||||
Pipelines available for audio tasks include the following.
 | 
			
		||||
 | 
			
		||||
### AudioClassificationPipeline
 | 
			
		||||
 | 
			
		||||
@ -337,33 +314,12 @@ That should enable you to do all the custom code you want.
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ConversationalPipeline
 | 
			
		||||
## Computer vision
 | 
			
		||||
 | 
			
		||||
[[autodoc]] Conversation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConversationalPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
Pipelines available for computer vision tasks include the following.
 | 
			
		||||
 | 
			
		||||
### DepthEstimationPipeline
 | 
			
		||||
[[autodoc]] DepthEstimationPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all 
 | 
			
		||||
 | 
			
		||||
### DocumentQuestionAnsweringPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DocumentQuestionAnsweringPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
### FeatureExtractionPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FeatureExtractionPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### FillMaskPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FillMaskPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
@ -379,9 +335,45 @@ That should enable you to do all the custom code you want.
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ImageToTextPipeline
 | 
			
		||||
### ObjectDetectionPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ImageToTextPipeline
 | 
			
		||||
[[autodoc]] ObjectDetectionPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### VideoClassificationPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] VideoClassificationPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ZeroShotImageClassificationPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ZeroShotImageClassificationPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ZeroShotObjectDetectionPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ZeroShotObjectDetectionPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
## Natural Language Processing
 | 
			
		||||
 | 
			
		||||
Pipelines available for natural language processing tasks include the following.
 | 
			
		||||
 | 
			
		||||
### ConversationalPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] Conversation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConversationalPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### FillMaskPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FillMaskPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
@ -391,12 +383,6 @@ That should enable you to do all the custom code you want.
 | 
			
		||||
 | 
			
		||||
See [`TokenClassificationPipeline`] for all details.
 | 
			
		||||
 | 
			
		||||
### ObjectDetectionPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ObjectDetectionPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### QuestionAnsweringPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] QuestionAnsweringPipeline
 | 
			
		||||
@ -444,27 +430,37 @@ See [`TokenClassificationPipeline`] for all details.
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### VisualQuestionAnsweringPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] VisualQuestionAnsweringPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ZeroShotClassificationPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ZeroShotClassificationPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ZeroShotImageClassificationPipeline
 | 
			
		||||
## Multimodal
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ZeroShotImageClassificationPipeline
 | 
			
		||||
Pipelines available for multimodal tasks include the following.
 | 
			
		||||
 | 
			
		||||
### DocumentQuestionAnsweringPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DocumentQuestionAnsweringPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ZeroShotObjectDetectionPipeline
 | 
			
		||||
### FeatureExtractionPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ZeroShotObjectDetectionPipeline
 | 
			
		||||
[[autodoc]] FeatureExtractionPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### ImageToTextPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ImageToTextPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
### VisualQuestionAnsweringPipeline
 | 
			
		||||
 | 
			
		||||
[[autodoc]] VisualQuestionAnsweringPipeline
 | 
			
		||||
    - __call__
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -20,8 +20,8 @@ Processors can mean two different things in the Transformers library:
 | 
			
		||||
## Multi-modal processors
 | 
			
		||||
 | 
			
		||||
Any multi-modal model will require an object to encode or decode the data that groups several modalities (among text,
 | 
			
		||||
vision and audio). This is handled by objects called processors, which group tokenizers (for the text modality) and
 | 
			
		||||
feature extractors (for vision and audio).
 | 
			
		||||
vision and audio). This is handled by objects called processors, which group together two or more processing objects
 | 
			
		||||
such as tokenizers (for the text modality), image processors (for vision) and feature extractors (for audio).
 | 
			
		||||
 | 
			
		||||
Those processors inherit from the following base class that implements the saving and loading functionality:
 | 
			
		||||
 | 
			
		||||
@ -112,7 +112,7 @@ Additionally, the following method can be used to convert SQuAD examples into
 | 
			
		||||
[[autodoc]] data.processors.squad.squad_convert_examples_to_features
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
These processors as well as the aforementionned method can be used with files containing the data as well as with the
 | 
			
		||||
These processors as well as the aforementioned method can be used with files containing the data as well as with the
 | 
			
		||||
*tensorflow_datasets* package. Examples are given below.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -12,29 +12,46 @@ specific language governing permissions and limitations under the License.
 | 
			
		||||
 | 
			
		||||
# Generation
 | 
			
		||||
 | 
			
		||||
Each framework has a generate method for auto-regressive text generation implemented in their respective `GenerationMixin` class:
 | 
			
		||||
Each framework has a generate method for text generation implemented in their respective `GenerationMixin` class:
 | 
			
		||||
 | 
			
		||||
- PyTorch [`~generation_utils.GenerationMixin.generate`] is implemented in [`~generation_utils.GenerationMixin`].
 | 
			
		||||
- TensorFlow [`~generation_tf_utils.TFGenerationMixin.generate`] is implemented in [`~generation_tf_utils.TFGenerationMixin`].
 | 
			
		||||
- Flax/JAX [`~generation_flax_utils.FlaxGenerationMixin.generate`] is implemented in [`~generation_flax_utils.FlaxGenerationMixin`].
 | 
			
		||||
- PyTorch [`~generation.GenerationMixin.generate`] is implemented in [`~generation.GenerationMixin`].
 | 
			
		||||
- TensorFlow [`~generation.TFGenerationMixin.generate`] is implemented in [`~generation.TFGenerationMixin`].
 | 
			
		||||
- Flax/JAX [`~generation.FlaxGenerationMixin.generate`] is implemented in [`~generation.FlaxGenerationMixin`].
 | 
			
		||||
 | 
			
		||||
Regardless of your framework of choice, you can parameterize the generate method with a [`~generation.GenerationConfig`]
 | 
			
		||||
class instance. Please refer to this class for the complete list of generation parameters, which control the behavior
 | 
			
		||||
of the generation method.
 | 
			
		||||
 | 
			
		||||
To learn how to inspect a model's generation configuration, what are the defaults, how to change the parameters ad hoc,
 | 
			
		||||
and how to create and save a customized generation configuration, refer to the
 | 
			
		||||
[text generation strategies guide](./generation_strategies).
 | 
			
		||||
 | 
			
		||||
## GenerationConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation.GenerationConfig
 | 
			
		||||
	- from_pretrained
 | 
			
		||||
	- from_model_config
 | 
			
		||||
	- save_pretrained
 | 
			
		||||
 | 
			
		||||
## GenerationMixin
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_utils.GenerationMixin
 | 
			
		||||
[[autodoc]] generation.GenerationMixin
 | 
			
		||||
	- generate
 | 
			
		||||
	- compute_transition_scores
 | 
			
		||||
	- greedy_search
 | 
			
		||||
	- sample
 | 
			
		||||
	- beam_search
 | 
			
		||||
	- beam_sample
 | 
			
		||||
	- contrastive_search
 | 
			
		||||
	- group_beam_search
 | 
			
		||||
	- constrained_beam_search
 | 
			
		||||
 | 
			
		||||
## TFGenerationMixin
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_tf_utils.TFGenerationMixin
 | 
			
		||||
[[autodoc]] generation.TFGenerationMixin
 | 
			
		||||
	- generate
 | 
			
		||||
 | 
			
		||||
## FlaxGenerationMixin
 | 
			
		||||
 | 
			
		||||
[[autodoc]] generation_flax_utils.FlaxGenerationMixin
 | 
			
		||||
[[autodoc]] generation.FlaxGenerationMixin
 | 
			
		||||
	- generate
 | 
			
		||||
 | 
			
		||||
@ -579,7 +579,7 @@ add `--fsdp "full_shard offload auto_wrap"` or `--fsdp "shard_grad_op offload au
 | 
			
		||||
  This specifies the transformer layer class name (case-sensitive) to wrap ,e.g, `BertLayer`, `GPTJBlock`, `T5Block` ....
 | 
			
		||||
  This is important because submodules that share weights (e.g., embedding layer) should not end up in different FSDP wrapped units. 
 | 
			
		||||
  Using this policy, wrapping happens for each block containing Multi-Head Attention followed by couple of MLP layers. 
 | 
			
		||||
  Remaining layers including the shared embeddings are conviniently wrapped in same outermost FSDP unit.
 | 
			
		||||
  Remaining layers including the shared embeddings are conveniently wrapped in same outermost FSDP unit.
 | 
			
		||||
  Therefore, use this for transformer based models.
 | 
			
		||||
  - For size based auto wrap policy, please add `--fsdp_min_num_params <number>` to command line arguments.
 | 
			
		||||
  It specifies FSDP's minimum number of parameters for auto wrapping.
 | 
			
		||||
@ -620,7 +620,7 @@ please follow this nice medium article [GPU-Acceleration Comes to PyTorch on M1
 | 
			
		||||
 | 
			
		||||
**Usage**:
 | 
			
		||||
User has to just pass `--use_mps_device` argument. 
 | 
			
		||||
For example, you can run the offical Glue text classififcation task (from the root folder) using Apple Silicon GPU with below command:
 | 
			
		||||
For example, you can run the official Glue text classififcation task (from the root folder) using Apple Silicon GPU with below command:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
export TASK_NAME=mrpc
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										107
									
								
								docs/source/en/model_doc/altclip.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								docs/source/en/model_doc/altclip.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,107 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# AltCLIP
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The AltCLIP model was proposed in [AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities](https://arxiv.org/abs/2211.06679v2) by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu. AltCLIP
 | 
			
		||||
(Altering the Language Encoder in CLIP) is a neural network trained on a variety of image-text and text-text pairs. By switching CLIP's
 | 
			
		||||
text encoder with a pretrained multilingual text encoder XLM-R, we could obtain very close performances with CLIP on almost all tasks, and extended original CLIP's capabilities such as multilingual understanding.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model. 
 | 
			
		||||
Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained 
 | 
			
		||||
multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of 
 | 
			
		||||
teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art 
 | 
			
		||||
performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with 
 | 
			
		||||
CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding.*
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
The usage of AltCLIP is very similar to the CLIP. the difference between CLIP is the text encoder. Note that we use bidirectional attention instead of casual attention
 | 
			
		||||
and we take the [CLS] token in XLM-R to represent text embedding.
 | 
			
		||||
 | 
			
		||||
AltCLIP is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image
 | 
			
		||||
classification. AltCLIP uses a ViT like transformer to get visual features and a bidirectional language model to get the text
 | 
			
		||||
features. Both the text and visual features are then projected to a latent space with identical dimension. The dot
 | 
			
		||||
product between the projected image and text features is then used as a similar score.
 | 
			
		||||
 | 
			
		||||
To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
 | 
			
		||||
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image. The authors
 | 
			
		||||
also add absolute position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder.
 | 
			
		||||
The [`CLIPImageProcessor`] can be used to resize (or rescale) and normalize images for the model.
 | 
			
		||||
 | 
			
		||||
The [`AltCLIPProcessor`] wraps a [`CLIPImageProcessor`] and a [`XLMRobertaTokenizer`] into a single instance to both
 | 
			
		||||
encode the text and prepare the images. The following example shows how to get the image-text similarity scores using
 | 
			
		||||
[`AltCLIPProcessor`] and [`AltCLIPModel`].
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from PIL import Image
 | 
			
		||||
>>> import requests
 | 
			
		||||
 | 
			
		||||
>>> from transformers import AltCLIPModel, AltCLIPProcessor
 | 
			
		||||
 | 
			
		||||
>>> model = AltCLIPModel.from_pretrained("BAAI/AltCLIP")
 | 
			
		||||
>>> processor = AltCLIPProcessor.from_pretrained("BAAI/AltCLIP")
 | 
			
		||||
 | 
			
		||||
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
 | 
			
		||||
>>> image = Image.open(requests.get(url, stream=True).raw)
 | 
			
		||||
 | 
			
		||||
>>> inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
 | 
			
		||||
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
>>> logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
 | 
			
		||||
>>> probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
This model is build on `CLIPModel`, so use it like a original CLIP. 
 | 
			
		||||
 | 
			
		||||
This model was contributed by [jongjyh](https://huggingface.co/jongjyh).
 | 
			
		||||
 | 
			
		||||
## AltCLIPConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPConfig
 | 
			
		||||
    - from_text_vision_configs
 | 
			
		||||
 | 
			
		||||
## AltCLIPTextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPTextConfig
 | 
			
		||||
 | 
			
		||||
## AltCLIPVisionConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPVisionConfig
 | 
			
		||||
 | 
			
		||||
## AltCLIPProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPProcessor
 | 
			
		||||
 | 
			
		||||
## AltCLIPModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPModel
 | 
			
		||||
    - forward
 | 
			
		||||
    - get_text_features
 | 
			
		||||
    - get_image_features
 | 
			
		||||
 | 
			
		||||
## AltCLIPTextModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPTextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## AltCLIPVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AltCLIPVisionModel
 | 
			
		||||
    - forward
 | 
			
		||||
							
								
								
									
										70
									
								
								docs/source/en/model_doc/audio-spectrogram-transformer.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								docs/source/en/model_doc/audio-spectrogram-transformer.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,70 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Audio Spectrogram Transformer
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The Audio Spectrogram Transformer model was proposed in [AST: Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778) by Yuan Gong, Yu-An Chung, James Glass.
 | 
			
		||||
The Audio Spectrogram Transformer applies a [Vision Transformer](vit) to audio, by turning audio into an image (spectrogram). The model obtains state-of-the-art results
 | 
			
		||||
for audio classification.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*In the past decade, convolutional neural networks (CNNs) have been widely adopted as the main building block for end-to-end audio classification models, which aim to learn a direct mapping from audio spectrograms to corresponding labels. To better capture long-range global context, a recent trend is to add a self-attention mechanism on top of the CNN, forming a CNN-attention hybrid model. However, it is unclear whether the reliance on a CNN is necessary, and if neural networks purely based on attention are sufficient to obtain good performance in audio classification. In this paper, we answer the question by introducing the Audio Spectrogram Transformer (AST), the first convolution-free, purely attention-based model for audio classification. We evaluate AST on various audio classification benchmarks, where it achieves new state-of-the-art results of 0.485 mAP on AudioSet, 95.6% accuracy on ESC-50, and 98.1% accuracy on Speech Commands V2.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- When fine-tuning the Audio Spectrogram Transformer (AST) on your own dataset, it's recommended to take care of the input normalization (to make
 | 
			
		||||
sure the input has mean of 0 and std of 0.5). [`ASTFeatureExtractor`] takes care of this. Note that it uses the AudioSet
 | 
			
		||||
mean and std by default. You can check [`ast/src/get_norm_stats.py`](https://github.com/YuanGongND/ast/blob/master/src/get_norm_stats.py) to see how
 | 
			
		||||
the authors compute the stats for a downstream dataset.
 | 
			
		||||
- Note that the AST needs a low learning rate (the authors use a 10 times smaller learning rate compared to their CNN model proposed in the
 | 
			
		||||
[PSLA paper](https://arxiv.org/abs/2102.01243)) and converges quickly, so please search for a suitable learning rate and learning rate scheduler for your task.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/audio_spectogram_transformer_architecture.png"
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Audio pectrogram Transformer architecture. Taken from the <a href="https://arxiv.org/abs/2104.01778">original paper</a>.</small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr).
 | 
			
		||||
The original code can be found [here](https://github.com/YuanGongND/ast).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with the Audio Spectrogram Transformer.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="audio-classification"/>
 | 
			
		||||
 | 
			
		||||
- A notebook illustrating inference with AST for audio classification can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/AST).
 | 
			
		||||
- [`ASTForAudioClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/audio-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/audio_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## ASTConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ASTConfig
 | 
			
		||||
 | 
			
		||||
## ASTFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ASTFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
## ASTModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ASTModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## ASTForAudioClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ASTForAudioClassification
 | 
			
		||||
    - forward
 | 
			
		||||
@ -66,230 +66,262 @@ Likewise, if your `NewModel` is a subclass of [`PreTrainedModel`], make sure its
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoFeatureExtractor
 | 
			
		||||
 | 
			
		||||
## AutoImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoImageProcessor
 | 
			
		||||
 | 
			
		||||
## AutoProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoProcessor
 | 
			
		||||
 | 
			
		||||
## AutoModel
 | 
			
		||||
## Generic model classes
 | 
			
		||||
 | 
			
		||||
The following auto classes are available for instantiating a base model class without a specific head.
 | 
			
		||||
 | 
			
		||||
### AutoModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModel
 | 
			
		||||
 | 
			
		||||
## AutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
## AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
## AutoModelForDepthEstimation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForDepthEstimation
 | 
			
		||||
 | 
			
		||||
## AutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
## AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
## AutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
## AutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
## AutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## AutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## AutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## AutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForVideoClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVideoClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
## AutoModelForVisualQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVisualQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## AutoModelForAudioClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForAudioFrameClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioFrameClassification
 | 
			
		||||
 | 
			
		||||
## AutoModelForCTC
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForCTC
 | 
			
		||||
 | 
			
		||||
## AutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
## AutoModelForAudioXVector
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioXVector
 | 
			
		||||
 | 
			
		||||
## AutoModelForMaskedImageModeling
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForMaskedImageModeling
 | 
			
		||||
 | 
			
		||||
## AutoModelForObjectDetection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForObjectDetection
 | 
			
		||||
 | 
			
		||||
## AutoModelForImageSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForImageSegmentation
 | 
			
		||||
 | 
			
		||||
## AutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
## AutoModelForInstanceSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForInstanceSegmentation
 | 
			
		||||
 | 
			
		||||
## AutoModelForZeroShotObjectDetection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForZeroShotObjectDetection
 | 
			
		||||
 | 
			
		||||
## TFAutoModel
 | 
			
		||||
### TFAutoModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModel
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
## TFAutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModel
 | 
			
		||||
### FlaxAutoModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModel
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForCausalLM
 | 
			
		||||
## Generic pretraining classes
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForCausalLM
 | 
			
		||||
The following auto classes are available for instantiating a model with a pretraining head.
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForPreTraining
 | 
			
		||||
### AutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForPreTraining
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForMaskedLM
 | 
			
		||||
## Natural Language Processing
 | 
			
		||||
 | 
			
		||||
The following auto classes are available for the following natural language processing tasks.
 | 
			
		||||
 | 
			
		||||
### AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
### AutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForMaskedLM
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForSeq2SeqLM
 | 
			
		||||
### AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForSeq2SeqLM
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForSequenceClassification
 | 
			
		||||
### AutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForSequenceClassification
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForQuestionAnswering
 | 
			
		||||
### AutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForQuestionAnswering
 | 
			
		||||
[[autodoc]] AutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForTokenClassification
 | 
			
		||||
### TFAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForTokenClassification
 | 
			
		||||
[[autodoc]] TFAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForMultipleChoice
 | 
			
		||||
### FlaxAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForMultipleChoice
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForNextSentencePrediction
 | 
			
		||||
### AutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForNextSentencePrediction
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForImageClassification
 | 
			
		||||
### AutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForTokenClassification
 | 
			
		||||
 | 
			
		||||
### AutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
## Computer vision
 | 
			
		||||
 | 
			
		||||
The following auto classes are available for the following computer vision tasks.
 | 
			
		||||
 | 
			
		||||
### AutoModelForDepthEstimation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForDepthEstimation
 | 
			
		||||
 | 
			
		||||
### AutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForImageClassification
 | 
			
		||||
 | 
			
		||||
## FlaxAutoModelForVision2Seq
 | 
			
		||||
### AutoModelForVideoClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVideoClassification
 | 
			
		||||
 | 
			
		||||
### AutoModelForMaskedImageModeling
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForMaskedImageModeling
 | 
			
		||||
 | 
			
		||||
### AutoModelForObjectDetection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForObjectDetection
 | 
			
		||||
 | 
			
		||||
### AutoModelForImageSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForImageSegmentation
 | 
			
		||||
 | 
			
		||||
### AutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
### AutoModelForInstanceSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForInstanceSegmentation
 | 
			
		||||
 | 
			
		||||
### AutoModelForUniversalSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForUniversalSegmentation
 | 
			
		||||
 | 
			
		||||
### AutoModelForZeroShotObjectDetection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForZeroShotObjectDetection
 | 
			
		||||
 | 
			
		||||
## Audio
 | 
			
		||||
 | 
			
		||||
The following auto classes are available for the following audio tasks.
 | 
			
		||||
 | 
			
		||||
### AutoModelForAudioClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioClassification
 | 
			
		||||
 | 
			
		||||
### AutoModelForAudioFrameClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioFrameClassification
 | 
			
		||||
 | 
			
		||||
### AutoModelForCTC
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForCTC
 | 
			
		||||
 | 
			
		||||
### AutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForSpeechSeq2Seq
 | 
			
		||||
 | 
			
		||||
### AutoModelForAudioXVector
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForAudioXVector
 | 
			
		||||
 | 
			
		||||
## Multimodal
 | 
			
		||||
 | 
			
		||||
The following auto classes are available for the following multimodal tasks.
 | 
			
		||||
 | 
			
		||||
### AutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForTableQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### AutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForDocumentQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### AutoModelForVisualQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVisualQuestionAnswering
 | 
			
		||||
 | 
			
		||||
### AutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] AutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
### TFAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
### FlaxAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxAutoModelForVision2Seq
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,11 @@ According to the abstract,
 | 
			
		||||
  state-of-the-art results on a range of abstractive dialogue, question answering, and summarization tasks, with gains
 | 
			
		||||
  of up to 6 ROUGE.
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- BART is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than
 | 
			
		||||
  the left.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [sshleifer](https://huggingface.co/sshleifer). The Authors' code can be found [here](https://github.com/pytorch/fairseq/tree/master/examples/bart).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -53,7 +58,7 @@ This model was contributed by [sshleifer](https://huggingface.co/sshleifer). The
 | 
			
		||||
- Model predictions are intended to be identical to the original implementation when
 | 
			
		||||
  `forced_bos_token_id=0`. This only works, however, if the string you pass to
 | 
			
		||||
  [`fairseq.encode`] starts with a space.
 | 
			
		||||
- [`~generation_utils.GenerationMixin.generate`] should be used for conditional generation tasks like
 | 
			
		||||
- [`~generation.GenerationMixin.generate`] should be used for conditional generation tasks like
 | 
			
		||||
  summarization, see the example in that docstrings.
 | 
			
		||||
- Models that load the *facebook/bart-large-cnn* weights will not have a `mask_token_id`, or be able to perform
 | 
			
		||||
  mask-filling tasks.
 | 
			
		||||
@ -75,6 +80,33 @@ assert tok.batch_decode(generated_ids, skip_special_tokens=True) == [
 | 
			
		||||
]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BART. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="summarization"/>
 | 
			
		||||
 | 
			
		||||
- A blog post on [Distributed Training: Train BART/T5 for Summarization using 🤗 Transformers and Amazon SageMaker](https://huggingface.co/blog/sagemaker-distributed-training-seq2seq).
 | 
			
		||||
- A notebook on how to [finetune BART for summarization with fastai using blurr](https://colab.research.google.com/github/ohmeow/ohmeow_website/blob/master/_notebooks/2020-05-23-text-generation-with-blurr.ipynb). 🌎
 | 
			
		||||
- A notebook on how to [finetune BART for summarization in two languages with Trainer class](https://colab.research.google.com/github/elsanns/xai-nlp-notebooks/blob/master/fine_tune_bart_summarization_two_langs.ipynb). 🌎
 | 
			
		||||
- [`BartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization) and [noteboook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization.ipynb).
 | 
			
		||||
- [`TFBartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/summarization) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/summarization-tf.ipynb).
 | 
			
		||||
- [`FlaxBartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/summarization).
 | 
			
		||||
- [Summarization](https://huggingface.co/course/chapter7/5?fw=pt#summarization) chapter of the 🤗 Hugging Face course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="fill-mask"/>
 | 
			
		||||
 | 
			
		||||
- [`BartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
- [`TFBartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
 | 
			
		||||
- [`FlaxBartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb).
 | 
			
		||||
- [Masked language modeling](https://huggingface.co/course/chapter7/3?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="translation"/>
 | 
			
		||||
 | 
			
		||||
- A notebook on how to [finetune mBART using Seq2SeqTrainer for Hindi to English translation](https://colab.research.google.com/github/vasudevgupta7/huggingface-tutorials/blob/main/translation_training.ipynb). 🌎
 | 
			
		||||
- [`BartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/translation) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/translation.ipynb).
 | 
			
		||||
- [`TFBartForConditionalGeneration`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/translation) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/translation-tf.ipynb).
 | 
			
		||||
 | 
			
		||||
## BartConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BartConfig
 | 
			
		||||
@ -125,6 +157,11 @@ assert tok.batch_decode(generated_ids, skip_special_tokens=True) == [
 | 
			
		||||
[[autodoc]] TFBartForConditionalGeneration
 | 
			
		||||
    - call
 | 
			
		||||
 | 
			
		||||
## TFBartForSequenceClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFBartForSequenceClassification
 | 
			
		||||
    - call
 | 
			
		||||
 | 
			
		||||
## FlaxBartModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxBartModel
 | 
			
		||||
@ -156,4 +193,4 @@ assert tok.batch_decode(generated_ids, skip_special_tokens=True) == [
 | 
			
		||||
## FlaxBartForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxBartForCausalLM
 | 
			
		||||
    - __call__
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
@ -40,12 +40,12 @@ Tips:
 | 
			
		||||
- BEiT models are regular Vision Transformers, but pre-trained in a self-supervised way rather than supervised. They
 | 
			
		||||
  outperform both the [original model (ViT)](vit) as well as [Data-efficient Image Transformers (DeiT)](deit) when fine-tuned on ImageNet-1K and CIFAR-100. You can check out demo notebooks regarding inference as well as
 | 
			
		||||
  fine-tuning on custom data [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer) (you can just replace
 | 
			
		||||
  [`ViTFeatureExtractor`] by [`BeitFeatureExtractor`] and
 | 
			
		||||
  [`ViTFeatureExtractor`] by [`BeitImageProcessor`] and
 | 
			
		||||
  [`ViTForImageClassification`] by [`BeitForImageClassification`]).
 | 
			
		||||
- There's also a demo notebook available which showcases how to combine DALL-E's image tokenizer with BEiT for
 | 
			
		||||
  performing masked image modeling. You can find it [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/BEiT).
 | 
			
		||||
- As the BEiT models expect each image to be of the same size (resolution), one can use
 | 
			
		||||
  [`BeitFeatureExtractor`] to resize (or rescale) and normalize images for the model.
 | 
			
		||||
  [`BeitImageProcessor`] to resize (or rescale) and normalize images for the model.
 | 
			
		||||
- Both the patch resolution and image resolution used during pre-training or fine-tuning are reflected in the name of
 | 
			
		||||
  each checkpoint. For example, `microsoft/beit-base-patch16-224` refers to a base-sized architecture with patch
 | 
			
		||||
  resolution of 16x16 and fine-tuning resolution of 224x224. All checkpoints can be found on the [hub](https://huggingface.co/models?search=microsoft/beit).
 | 
			
		||||
@ -60,13 +60,22 @@ Tips:
 | 
			
		||||
  position embeddings.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/beit_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> BEiT pre-training. Taken from the <a href="https://arxiv.org/abs/2106.08254">original paper.</a> </small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The JAX/FLAX version of this model was
 | 
			
		||||
contributed by [kamalkraj](https://huggingface.co/kamalkraj). The original code can be found [here](https://github.com/microsoft/unilm/tree/master/beit).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BEiT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`BeitForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## BEiT specific outputs
 | 
			
		||||
 | 
			
		||||
@ -84,6 +93,12 @@ contributed by [kamalkraj](https://huggingface.co/kamalkraj). The original code
 | 
			
		||||
    - __call__
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
 | 
			
		||||
## BeitImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BeitImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
 | 
			
		||||
## BeitModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BeitModel
 | 
			
		||||
 | 
			
		||||
@ -41,6 +41,62 @@ Tips:
 | 
			
		||||
 | 
			
		||||
This model was contributed by [thomwolf](https://huggingface.co/thomwolf). The original code can be found [here](https://github.com/google-research/bert).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BERT. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="text-classification"/>
 | 
			
		||||
 | 
			
		||||
- A blog post on [BERT Text Classification in a different language](https://www.philschmid.de/bert-text-classification-in-a-different-language).
 | 
			
		||||
- A notebook for [Finetuning BERT (and friends) for multi-label text classification](https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/BERT/Fine_tuning_BERT_(and_friends)_for_multi_label_text_classification.ipynb).
 | 
			
		||||
- A notebook on how to [Finetune BERT for multi-label classification using PyTorch](https://colab.research.google.com/github/abhimishra91/transformers-tutorials/blob/master/transformers_multi_label_classification.ipynb). 🌎
 | 
			
		||||
- A notebook on how to [warm-start an EncoderDecoder model with BERT for summarization](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/BERT2BERT_for_CNN_Dailymail.ipynb).
 | 
			
		||||
- [`BertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb).
 | 
			
		||||
- [`TFBertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb).
 | 
			
		||||
- [`FlaxBertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb).
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="token-classification"/>
 | 
			
		||||
 | 
			
		||||
- A blog post on how to use [Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition](https://www.philschmid.de/huggingface-transformers-keras-tf).
 | 
			
		||||
- A notebook for [Finetuning BERT for named-entity recognition](https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/Custom_Named_Entity_Recognition_with_BERT_only_first_wordpiece.ipynb) using only the first wordpiece of each word in the word label during tokenization. To propagate the label of the word to all wordpieces, see this [version](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/BERT/Custom_Named_Entity_Recognition_with_BERT.ipynb) of the notebook instead.
 | 
			
		||||
- [`BertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb).
 | 
			
		||||
- [`TFBertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb).
 | 
			
		||||
- [`FlaxBertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification).
 | 
			
		||||
- [Token classification](https://huggingface.co/course/chapter7/2?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="fill-mask"/>
 | 
			
		||||
 | 
			
		||||
- [`BertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
- [`TFBertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
 | 
			
		||||
- [`FlaxBertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb).
 | 
			
		||||
- [Masked language modeling](https://huggingface.co/course/chapter7/3?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="question-answering"/>
 | 
			
		||||
 | 
			
		||||
- [`BertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb).
 | 
			
		||||
- [`TFBertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb).
 | 
			
		||||
- [`FlaxBertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering).
 | 
			
		||||
- [Question answering](https://huggingface.co/course/chapter7/7?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
**Multiple choice**
 | 
			
		||||
- [`BertForMultipleChoice`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb).
 | 
			
		||||
- [`TFBertForMultipleChoice`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb).
 | 
			
		||||
 | 
			
		||||
⚡️ **Inference**
 | 
			
		||||
- A blog post on how to [Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia](https://huggingface.co/blog/bert-inferentia-sagemaker).
 | 
			
		||||
- A blog post on how to [Accelerate BERT inference with DeepSpeed-Inference on GPUs](https://www.philschmid.de/bert-deepspeed-inference).
 | 
			
		||||
 | 
			
		||||
⚙️ **Pretraining**
 | 
			
		||||
- A blog post on [Pre-Training BERT with Hugging Face Transformers and Habana Gaudi](https://www.philschmid.de/pre-training-bert-habana).
 | 
			
		||||
 | 
			
		||||
🚀 **Deploy**
 | 
			
		||||
- A blog post on how to [Convert Transformers to ONNX with Hugging Face Optimum](https://www.philschmid.de/convert-transformers-to-onnx).
 | 
			
		||||
- A blog post on how to [Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS](https://www.philschmid.de/getting-started-habana-gaudi#conclusion).
 | 
			
		||||
- A blog post on [Autoscaling BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module](https://www.philschmid.de/terraform-huggingface-amazon-sagemaker-advanced).
 | 
			
		||||
- A blog post on [Serverless BERT with HuggingFace, AWS Lambda, and Docker](https://www.philschmid.de/serverless-bert-with-huggingface-aws-lambda-docker).
 | 
			
		||||
- A blog post on [Hugging Face Transformers BERT fine-tuning using Amazon SageMaker and Training Compiler](https://www.philschmid.de/huggingface-amazon-sagemaker-training-compiler).
 | 
			
		||||
- A blog post on [Task-specific knowledge distillation for BERT using Transformers & Amazon SageMaker](https://www.philschmid.de/knowledge-distillation-bert-transformers).
 | 
			
		||||
 | 
			
		||||
## BertConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BertConfig
 | 
			
		||||
 | 
			
		||||
@ -46,6 +46,8 @@ Tips:
 | 
			
		||||
- Sequence length must be divisible by block size.
 | 
			
		||||
- Current implementation supports only **ITC**.
 | 
			
		||||
- Current implementation doesn't support **num_random_blocks = 0**
 | 
			
		||||
- BigBird is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than
 | 
			
		||||
  the left.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [vasudevgupta](https://huggingface.co/vasudevgupta). The original code can be found
 | 
			
		||||
[here](https://github.com/google-research/bigbird).
 | 
			
		||||
 | 
			
		||||
@ -47,6 +47,8 @@ Tips:
 | 
			
		||||
- Current implementation supports only **ITC**.
 | 
			
		||||
- Current implementation doesn't support **num_random_blocks = 0**.
 | 
			
		||||
- BigBirdPegasus uses the [PegasusTokenizer](https://github.com/huggingface/transformers/blob/main/src/transformers/models/pegasus/tokenization_pegasus.py).
 | 
			
		||||
- BigBird is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than
 | 
			
		||||
  the left.
 | 
			
		||||
 | 
			
		||||
The original code can be found [here](https://github.com/google-research/bigbird).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										52
									
								
								docs/source/en/model_doc/biogpt.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								docs/source/en/model_doc/biogpt.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# BioGPT
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The BioGPT model was proposed in [BioGPT: generative pre-trained transformer for biomedical text generation and mining
 | 
			
		||||
](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9) by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu. BioGPT is a domain-specific generative pre-trained Transformer language model for biomedical text generation and mining. BioGPT follows the Transformer language model backbone, and is pre-trained on 15M PubMed abstracts from scratch.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Pre-trained language models have attracted increasing attention in the biomedical domain, inspired by their great success in the general natural language domain. Among the two main branches of pre-trained language models in the general language domain, i.e. BERT (and its variants) and GPT (and its variants), the first one has been extensively studied in the biomedical domain, such as BioBERT and PubMedBERT. While they have achieved great success on a variety of discriminative downstream biomedical tasks, the lack of generation ability constrains their application scope. In this paper, we propose BioGPT, a domain-specific generative Transformer language model pre-trained on large-scale biomedical literature. We evaluate BioGPT on six biomedical natural language processing tasks and demonstrate that our model outperforms previous models on most tasks. Especially, we get 44.98%, 38.42% and 40.76% F1 score on BC5CDR, KD-DTI and DDI end-to-end relation extraction tasks, respectively, and 78.2% accuracy on PubMedQA, creating a new record. Our case study on text generation further demonstrates the advantage of BioGPT on biomedical literature to generate fluent descriptions for biomedical terms.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- BioGPT is a model with absolute position embeddings so it’s usually advised to pad the inputs on the right rather than the left.
 | 
			
		||||
- BioGPT was trained with a causal language modeling (CLM) objective and is therefore powerful at predicting the next token in a sequence. Leveraging this feature allows BioGPT to generate syntactically coherent text as it can be observed in the run_generation.py example script.
 | 
			
		||||
- The model can take the `past_key_values` (for PyTorch) as input, which is the previously computed key/value attention pairs. Using this (past_key_values or past) value prevents the model from re-computing pre-computed values in the context of text generation. For PyTorch, see past_key_values argument of the BioGptForCausalLM.forward() method for more information on its usage.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [kamalkraj](https://huggingface.co/kamalkraj). The original code can be found [here](https://github.com/microsoft/BioGPT).
 | 
			
		||||
 | 
			
		||||
## BioGptConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BioGptConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BioGptTokenizer
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BioGptTokenizer
 | 
			
		||||
    - save_vocabulary
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BioGptModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BioGptModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BioGptForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BioGptForCausalLM
 | 
			
		||||
    - forward
 | 
			
		||||
							
								
								
									
										61
									
								
								docs/source/en/model_doc/bit.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								docs/source/en/model_doc/bit.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,61 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Big Transfer (BiT)
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The BiT model was proposed in [Big Transfer (BiT): General Visual Representation Learning](https://arxiv.org/abs/1912.11370) by Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, Neil Houlsby.
 | 
			
		||||
BiT is a simple recipe for scaling up pre-training of [ResNet](resnet)-like architectures (specifically, ResNetv2). The method results in significant improvements for transfer learning.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Transfer of pre-trained representations improves sample efficiency and simplifies hyperparameter tuning when training deep neural networks for vision. We revisit the paradigm of pre-training on large supervised datasets and fine-tuning the model on a target task. We scale up pre-training, and propose a simple recipe that we call Big Transfer (BiT). By combining a few carefully selected components, and transferring using a simple heuristic, we achieve strong performance on over 20 datasets. BiT performs well across a surprisingly wide range of data regimes -- from 1 example per class to 1M total examples. BiT achieves 87.5% top-1 accuracy on ILSVRC-2012, 99.4% on CIFAR-10, and 76.3% on the 19 task Visual Task Adaptation Benchmark (VTAB). On small datasets, BiT attains 76.8% on ILSVRC-2012 with 10 examples per class, and 97.0% on CIFAR-10 with 10 examples per class. We conduct detailed analysis of the main components that lead to high transfer performance.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- BiT models are equivalent to ResNetv2 in terms of architecture, except that: 1) all batch normalization layers are replaced by [group normalization](https://arxiv.org/abs/1803.08494),
 | 
			
		||||
2) [weight standardization](https://arxiv.org/abs/1903.10520) is used for convolutional layers. The authors show that the combination of both is useful for training with large batch sizes, and has a significant
 | 
			
		||||
impact on transfer learning.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr).
 | 
			
		||||
The original code can be found [here](https://github.com/google-research/big_transfer).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BiT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`BitForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## BitConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BitConfig
 | 
			
		||||
 | 
			
		||||
## BitImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BitImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## BitModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BitModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## BitForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BitForImageClassification
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,11 @@ and code publicly available. Human evaluations show our best models are superior
 | 
			
		||||
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
 | 
			
		||||
failure cases of our models.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- Blenderbot Small is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than
 | 
			
		||||
  the left.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [patrickvonplaten](https://huggingface.co/patrickvonplaten). The authors' code can be
 | 
			
		||||
found [here](https://github.com/facebookresearch/ParlAI) .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,11 @@ and code publicly available. Human evaluations show our best models are superior
 | 
			
		||||
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
 | 
			
		||||
failure cases of our models.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- Blenderbot is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than
 | 
			
		||||
  the left.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [sshleifer](https://huggingface.co/sshleifer). The authors' code can be found [here](https://github.com/facebookresearch/ParlAI) .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										96
									
								
								docs/source/en/model_doc/blip.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								docs/source/en/model_doc/blip.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,96 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# BLIP
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The BLIP model was proposed in [BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation](https://arxiv.org/abs/2201.12086) by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.
 | 
			
		||||
 | 
			
		||||
BLIP is a model that is able to perform various multi-modal tasks including
 | 
			
		||||
- Visual Question Answering 
 | 
			
		||||
- Image-Text retrieval (Image-text matching)
 | 
			
		||||
- Image Captioning
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks. 
 | 
			
		||||
However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the noisy web data by bootstrapping the captions, where a captioner generates synthetic captions and a filter removes the noisy ones. We achieve state-of-the-art results on a wide range of vision-language tasks, such as image-text retrieval (+2.7% in average recall@1), image captioning (+2.8% in CIDEr), and VQA (+1.6% in VQA score). BLIP also demonstrates strong generalization ability when directly transferred to videolanguage tasks in a zero-shot manner. Code, models, and datasets are released.*
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
This model was contributed by [ybelkada](https://huggingface.co/ybelkada).
 | 
			
		||||
The original code can be found [here](https://github.com/salesforce/BLIP).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
- [Jupyter notebook](https://github.com/huggingface/notebooks/blob/main/examples/image_captioning_blip.ipynb) on how to fine-tune BLIP for image captioning on a custom dataset
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipConfig
 | 
			
		||||
    - from_text_vision_configs
 | 
			
		||||
 | 
			
		||||
## BlipTextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipTextConfig
 | 
			
		||||
 | 
			
		||||
## BlipVisionConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipVisionConfig
 | 
			
		||||
 | 
			
		||||
## BlipProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipProcessor
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## BlipModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipModel
 | 
			
		||||
    - forward
 | 
			
		||||
    - get_text_features
 | 
			
		||||
    - get_image_features
 | 
			
		||||
 | 
			
		||||
## BlipTextModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipTextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipVisionModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipForConditionalGeneration
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipForConditionalGeneration
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipForImageTextRetrieval
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipForImageTextRetrieval
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BlipForQuestionAnswering
 | 
			
		||||
 | 
			
		||||
[[autodoc]] BlipForQuestionAnswering
 | 
			
		||||
    - forward
 | 
			
		||||
@ -25,6 +25,21 @@ Several smaller versions of the models have been trained on the same dataset. BL
 | 
			
		||||
- [bloom-7b1](https://huggingface.co/bigscience/bloom-7b1)
 | 
			
		||||
- [bloom](https://huggingface.co/bigscience/bloom) (176B parameters)
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BLOOM. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="text-generation"/>
 | 
			
		||||
 | 
			
		||||
- [`BloomForCausalLM`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
 | 
			
		||||
⚡️ Inference
 | 
			
		||||
- A blog on [Optimization story: Bloom inference](https://huggingface.co/blog/bloom-inference-optimization).
 | 
			
		||||
- A blog on [Incredibly Fast BLOOM Inference with DeepSpeed and Accelerate](https://huggingface.co/blog/bloom-inference-pytorch-scripts).
 | 
			
		||||
 | 
			
		||||
⚙️ Training
 | 
			
		||||
- A blog on [The Technology Behind BLOOM Training](https://huggingface.co/blog/bloom-megatron-deepspeed).
 | 
			
		||||
 | 
			
		||||
## BloomConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										108
									
								
								docs/source/en/model_doc/chinese_clip.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								docs/source/en/model_doc/chinese_clip.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,108 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Chinese-CLIP
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The Chinese-CLIP model was proposed in [Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese](https://arxiv.org/abs/2211.01335) by An Yang, Junshu Pan, Junyang Lin, Rui Men, Yichang Zhang, Jingren Zhou, Chang Zhou.
 | 
			
		||||
Chinese-CLIP is an implementation of CLIP (Radford et al., 2021) on a large-scale dataset of Chinese image-text pairs. It is capable of performing cross-modal retrieval and also playing as a vision backbone for vision tasks like zero-shot image classification, open-domain object detection, etc. The original Chinese-CLIP code is released [at this link](https://github.com/OFA-Sys/Chinese-CLIP).
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*The tremendous success of CLIP (Radford et al., 2021) has promoted the research and application of contrastive learning for vision-language pretraining. In this work, we construct a large-scale dataset of image-text pairs in Chinese, where most data are retrieved from publicly available datasets, and we pretrain Chinese CLIP models on the new dataset. We develop 5 Chinese CLIP models of multiple sizes, spanning from 77 to 958 million parameters. Furthermore, we propose a two-stage pretraining method, where the model is first trained with the image encoder frozen and then trained with all parameters being optimized, to achieve enhanced model performance. Our comprehensive experiments demonstrate that Chinese CLIP can achieve the state-of-the-art performance on MUGE, Flickr30K-CN, and COCO-CN in the setups of zero-shot learning and finetuning, and it is able to achieve competitive performance in zero-shot image classification based on the evaluation on the ELEVATER benchmark (Li et al., 2022). Our codes, pretrained models, and demos have been released.*
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
The code snippet below shows how to compute image & text features and similarities:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from PIL import Image
 | 
			
		||||
>>> import requests
 | 
			
		||||
>>> from transformers import ChineseCLIPProcessor, ChineseCLIPModel
 | 
			
		||||
 | 
			
		||||
>>> model = ChineseCLIPModel.from_pretrained("OFA-Sys/chinese-clip-vit-base-patch16")
 | 
			
		||||
>>> processor = ChineseCLIPProcessor.from_pretrained("OFA-Sys/chinese-clip-vit-base-patch16")
 | 
			
		||||
 | 
			
		||||
>>> url = "https://clip-cn-beijing.oss-cn-beijing.aliyuncs.com/pokemon.jpeg"
 | 
			
		||||
>>> image = Image.open(requests.get(url, stream=True).raw)
 | 
			
		||||
>>> # Squirtle, Bulbasaur, Charmander, Pikachu in English
 | 
			
		||||
>>> texts = ["杰尼龟", "妙蛙种子", "小火龙", "皮卡丘"]
 | 
			
		||||
 | 
			
		||||
>>> # compute image feature
 | 
			
		||||
>>> inputs = processor(images=image, return_tensors="pt")
 | 
			
		||||
>>> image_features = model.get_image_features(**inputs)
 | 
			
		||||
>>> image_features = image_features / image_features.norm(p=2, dim=-1, keepdim=True)  # normalize
 | 
			
		||||
 | 
			
		||||
>>> # compute text features
 | 
			
		||||
>>> inputs = processor(text=texts, padding=True, return_tensors="pt")
 | 
			
		||||
>>> text_features = model.get_text_features(**inputs)
 | 
			
		||||
>>> text_features = text_features / text_features.norm(p=2, dim=-1, keepdim=True)  # normalize
 | 
			
		||||
 | 
			
		||||
>>> # compute image-text similarity scores
 | 
			
		||||
>>> inputs = processor(text=texts, images=image, return_tensors="pt", padding=True)
 | 
			
		||||
>>> outputs = model(**inputs)
 | 
			
		||||
>>> logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
 | 
			
		||||
>>> probs = logits_per_image.softmax(dim=1)  # probs: [[1.2686e-03, 5.4499e-02, 6.7968e-04, 9.4355e-01]]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Currently, we release the following scales of pretrained Chinese-CLIP models at HF Model Hub:
 | 
			
		||||
 | 
			
		||||
- [OFA-Sys/chinese-clip-vit-base-patch16](https://huggingface.co/OFA-Sys/chinese-clip-vit-base-patch16)
 | 
			
		||||
- [OFA-Sys/chinese-clip-vit-large-patch14](https://huggingface.co/OFA-Sys/chinese-clip-vit-large-patch14)
 | 
			
		||||
- [OFA-Sys/chinese-clip-vit-large-patch14-336px](https://huggingface.co/OFA-Sys/chinese-clip-vit-large-patch14-336px)
 | 
			
		||||
- [OFA-Sys/chinese-clip-vit-huge-patch14](https://huggingface.co/OFA-Sys/chinese-clip-vit-huge-patch14)
 | 
			
		||||
 | 
			
		||||
The Chinese-CLIP model was contributed by [OFA-Sys](https://huggingface.co/OFA-Sys). 
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPConfig
 | 
			
		||||
    - from_text_vision_configs
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPTextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPTextConfig
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPVisionConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPVisionConfig
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPFeatureExtractor
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPProcessor
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPModel
 | 
			
		||||
    - forward
 | 
			
		||||
    - get_text_features
 | 
			
		||||
    - get_image_features
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPTextModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPTextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## ChineseCLIPVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ChineseCLIPVisionModel
 | 
			
		||||
    - forward
 | 
			
		||||
@ -75,6 +75,16 @@ encode the text and prepare the images. The following example shows how to get t
 | 
			
		||||
 | 
			
		||||
This model was contributed by [valhalla](https://huggingface.co/valhalla). The original code can be found [here](https://github.com/openai/CLIP).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with CLIP.
 | 
			
		||||
 | 
			
		||||
- A blog post on [How to fine-tune CLIP on 10,000 image-text pairs](https://huggingface.co/blog/fine-tune-clip-rsicd).
 | 
			
		||||
- CLIP is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/contrastive-image-text).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it.
 | 
			
		||||
The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## CLIPConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPConfig
 | 
			
		||||
@ -100,6 +110,11 @@ This model was contributed by [valhalla](https://huggingface.co/valhalla). The o
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPTokenizerFast
 | 
			
		||||
 | 
			
		||||
## CLIPImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## CLIPFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPFeatureExtractor
 | 
			
		||||
@ -120,6 +135,17 @@ This model was contributed by [valhalla](https://huggingface.co/valhalla). The o
 | 
			
		||||
[[autodoc]] CLIPTextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## CLIPTextModelWithProjection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPTextModelWithProjection
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## CLIPVisionModelWithProjection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPVisionModelWithProjection
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## CLIPVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPVisionModel
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										100
									
								
								docs/source/en/model_doc/clipseg.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								docs/source/en/model_doc/clipseg.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,100 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# CLIPSeg
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The CLIPSeg model was proposed in [Image Segmentation Using Text and Image Prompts](https://arxiv.org/abs/2112.10003) by Timo Lüddecke
 | 
			
		||||
and Alexander Ecker. CLIPSeg adds a minimal decoder on top of a frozen [CLIP](clip) model for zero- and one-shot image segmentation.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Image segmentation is usually addressed by training a
 | 
			
		||||
model for a fixed set of object classes. Incorporating additional classes or more complex queries later is expensive
 | 
			
		||||
as it requires re-training the model on a dataset that encompasses these expressions. Here we propose a system
 | 
			
		||||
that can generate image segmentations based on arbitrary
 | 
			
		||||
prompts at test time. A prompt can be either a text or an
 | 
			
		||||
image. This approach enables us to create a unified model
 | 
			
		||||
(trained once) for three common segmentation tasks, which
 | 
			
		||||
come with distinct challenges: referring expression segmentation, zero-shot segmentation and one-shot segmentation.
 | 
			
		||||
We build upon the CLIP model as a backbone which we extend with a transformer-based decoder that enables dense
 | 
			
		||||
prediction. After training on an extended version of the
 | 
			
		||||
PhraseCut dataset, our system generates a binary segmentation map for an image based on a free-text prompt or on
 | 
			
		||||
an additional image expressing the query. We analyze different variants of the latter image-based prompts in detail.
 | 
			
		||||
This novel hybrid input allows for dynamic adaptation not
 | 
			
		||||
only to the three segmentation tasks mentioned above, but
 | 
			
		||||
to any binary segmentation task where a text or image query
 | 
			
		||||
can be formulated. Finally, we find our system to adapt well
 | 
			
		||||
to generalized queries involving affordances or properties*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- [`CLIPSegForImageSegmentation`] adds a decoder on top of [`CLIPSegModel`]. The latter is identical to [`CLIPModel`].
 | 
			
		||||
- [`CLIPSegForImageSegmentation`] can generate image segmentations based on arbitrary prompts at test time. A prompt can be either a text
 | 
			
		||||
(provided to the model as `input_ids`) or an image (provided to the model as `conditional_pixel_values`). One can also provide custom
 | 
			
		||||
conditional embeddings (provided to the model as `conditional_embeddings`).
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/clipseg_architecture.png"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
 | 
			
		||||
<small> CLIPSeg overview. Taken from the <a href="https://arxiv.org/abs/2112.10003">original paper.</a> </small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr).
 | 
			
		||||
The original code can be found [here](https://github.com/timojl/clipseg).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with CLIPSeg. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-segmentation"/>
 | 
			
		||||
 | 
			
		||||
- A notebook that illustrates [zero-shot image segmentation with CLIPSeg](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/CLIPSeg/Zero_shot_image_segmentation_with_CLIPSeg.ipynb).
 | 
			
		||||
 | 
			
		||||
## CLIPSegConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegConfig
 | 
			
		||||
    - from_text_vision_configs
 | 
			
		||||
 | 
			
		||||
## CLIPSegTextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegTextConfig
 | 
			
		||||
 | 
			
		||||
## CLIPSegVisionConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegVisionConfig
 | 
			
		||||
 | 
			
		||||
## CLIPSegProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegProcessor
 | 
			
		||||
 | 
			
		||||
## CLIPSegModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegModel
 | 
			
		||||
    - forward
 | 
			
		||||
    - get_text_features
 | 
			
		||||
    - get_image_features
 | 
			
		||||
 | 
			
		||||
## CLIPSegTextModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegTextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## CLIPSegVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegVisionModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## CLIPSegForImageSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CLIPSegForImageSegmentation
 | 
			
		||||
    - forward
 | 
			
		||||
@ -21,7 +21,7 @@ The abstract from the paper is the following:
 | 
			
		||||
*The recently-developed DETR approach applies the transformer encoder and decoder architecture to object detection and achieves promising performance. In this paper, we handle the critical issue, slow training convergence, and present a conditional cross-attention mechanism for fast DETR training. Our approach is motivated by that the cross-attention in DETR relies highly on the content embeddings for localizing the four extremities and predicting the box, which increases the need for high-quality content embeddings and thus the training difficulty. Our approach, named conditional DETR, learns a conditional spatial query from the decoder embedding for decoder multi-head cross-attention. The benefit is that through the conditional spatial query, each cross-attention head is able to attend to a band containing a distinct region, e.g., one object extremity or a region inside the object box. This narrows down the spatial range for localizing the distinct regions for object classification and box regression, thus relaxing the dependence on the content embeddings and easing the training. Empirical results show that conditional DETR converges 6.7× faster for the backbones R50 and R101 and 10× faster for stronger backbones DC5-R50 and DC5-R101. Code is available at https://github.com/Atten4Vis/ConditionalDETR.*
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/conditional_detr_curve.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Conditional DETR shows much faster convergence compared to the original DETR. Taken from the <a href="https://arxiv.org/abs/2108.06152">original paper</a>.</small>
 | 
			
		||||
 | 
			
		||||
@ -32,14 +32,25 @@ This model was contributed by [DepuMeng](https://huggingface.co/DepuMeng). The o
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConditionalDetrConfig
 | 
			
		||||
 | 
			
		||||
## ConditionalDetrImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConditionalDetrImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
    - pad_and_create_pixel_mask
 | 
			
		||||
    - post_process_object_detection
 | 
			
		||||
    - post_process_instance_segmentation
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
    - post_process_panoptic_segmentation
 | 
			
		||||
 | 
			
		||||
## ConditionalDetrFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConditionalDetrFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
    - pad_and_create_pixel_mask
 | 
			
		||||
    - post_process
 | 
			
		||||
    - post_process_segmentation
 | 
			
		||||
    - post_process_panoptic
 | 
			
		||||
    - post_process_object_detection
 | 
			
		||||
    - post_process_instance_segmentation
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
    - post_process_panoptic_segmentation
 | 
			
		||||
 | 
			
		||||
## ConditionalDetrModel
 | 
			
		||||
 | 
			
		||||
@ -54,4 +65,4 @@ This model was contributed by [DepuMeng](https://huggingface.co/DepuMeng). The o
 | 
			
		||||
## ConditionalDetrForSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConditionalDetrForSegmentation
 | 
			
		||||
    - forward
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
@ -33,29 +33,41 @@ Tips:
 | 
			
		||||
- See the code examples below each model regarding usage.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> ConvNeXT architecture. Taken from the <a href="https://arxiv.org/abs/2201.03545">original paper</a>.</small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). TensorFlow version of the model was contributed by [ariG23498](https://github.com/ariG23498),
 | 
			
		||||
[gante](https://github.com/gante), and [sayakpaul](https://github.com/sayakpaul) (equal contribution). The original code can be found [here](https://github.com/facebookresearch/ConvNeXt).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ConvNeXT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`ConvNextForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## ConvNextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConvNextConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## ConvNextFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConvNextFeatureExtractor
 | 
			
		||||
 | 
			
		||||
## ConvNextImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConvNextImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## ConvNextModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConvNextModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## ConvNextForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] ConvNextForImageClassification
 | 
			
		||||
@ -71,4 +83,4 @@ This model was contributed by [nielsr](https://huggingface.co/nielsr). TensorFlo
 | 
			
		||||
## TFConvNextForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFConvNextForImageClassification
 | 
			
		||||
    - call
 | 
			
		||||
    - call
 | 
			
		||||
 | 
			
		||||
@ -32,12 +32,22 @@ a crucial component in existing Vision Transformers, can be safely removed in ou
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- CvT models are regular Vision Transformers, but trained with convolutions. They outperform the [original model (ViT)](vit) when fine-tuned on ImageNet-1K and CIFAR-100.
 | 
			
		||||
- You can check out demo notebooks regarding inference as well as fine-tuning on custom data [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer) (you can just replace [`ViTFeatureExtractor`] by [`AutoFeatureExtractor`] and [`ViTForImageClassification`] by [`CvtForImageClassification`]).
 | 
			
		||||
- You can check out demo notebooks regarding inference as well as fine-tuning on custom data [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer) (you can just replace [`ViTFeatureExtractor`] by [`AutoImageProcessor`] and [`ViTForImageClassification`] by [`CvtForImageClassification`]).
 | 
			
		||||
- The available checkpoints are either (1) pre-trained on [ImageNet-22k](http://www.image-net.org/) (a collection of 14 million images and 22k classes) only, (2) also fine-tuned on ImageNet-22k or (3) also fine-tuned on [ImageNet-1k](http://www.image-net.org/challenges/LSVRC/2012/) (also referred to as ILSVRC 2012, a collection of 1.3 million
 | 
			
		||||
  images and 1,000 classes).
 | 
			
		||||
 | 
			
		||||
This model was contributed by [anugunj](https://huggingface.co/anugunj). The original code can be found [here](https://github.com/microsoft/CvT).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with CvT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`CvtForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## CvtConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] CvtConfig
 | 
			
		||||
 | 
			
		||||
@ -37,9 +37,6 @@ Tips:
 | 
			
		||||
- For Data2VecAudio, preprocessing is identical to [`Wav2Vec2Model`], including feature extraction
 | 
			
		||||
- For Data2VecText, preprocessing is identical to [`RobertaModel`], including tokenization.
 | 
			
		||||
- For Data2VecVision, preprocessing is identical to [`BeitModel`], including feature extraction.
 | 
			
		||||
- To know how a pre-trained Data2Vec vision model can be fine-tuned on the task of image classification, you can check out
 | 
			
		||||
[this notebook](https://colab.research.google.com/github/sayakpaul/TF-2.0-Hacks/blob/master/data2vec_vision_image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
This model was contributed by [edugp](https://huggingface.co/edugp) and [patrickvonplaten](https://huggingface.co/patrickvonplaten).
 | 
			
		||||
[sayakpaul](https://github.com/sayakpaul) and [Rocketknight1](https://github.com/Rocketknight1) contributed Data2Vec for vision in TensorFlow.
 | 
			
		||||
@ -48,6 +45,17 @@ The original code (for NLP and Speech) can be found [here](https://github.com/py
 | 
			
		||||
The original code for vision can be found [here](https://github.com/facebookresearch/data2vec_vision/tree/main/beit).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Data2Vec.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`Data2VecVisionForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
- To fine-tune [`TFData2VecVisionForImageClassification`] on a custom dataset, see [this notebook](https://colab.research.google.com/github/sayakpaul/TF-2.0-Hacks/blob/master/data2vec_vision_image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## Data2VecTextConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] Data2VecTextConfig
 | 
			
		||||
 | 
			
		||||
@ -38,6 +38,35 @@ pre-trained models will be made publicly available at https://github.com/microso
 | 
			
		||||
This model was contributed by [DeBERTa](https://huggingface.co/DeBERTa). This model TF 2.0 implementation was
 | 
			
		||||
contributed by [kamalkraj](https://huggingface.co/kamalkraj) . The original code can be found [here](https://github.com/microsoft/DeBERTa).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DeBERTa. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="text-classification"/>
 | 
			
		||||
 | 
			
		||||
- A blog post on how to [Accelerate Large Model Training using DeepSpeed](https://huggingface.co/blog/accelerate-deepspeed) with DeBERTa.
 | 
			
		||||
- A blog post on [Supercharged Customer Service with Machine Learning](https://huggingface.co/blog/supercharge-customer-service-with-machine-learning) with DeBERTa.
 | 
			
		||||
- [`DebertaForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb).
 | 
			
		||||
- [`TFDebertaForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb).
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="token-classification" />
 | 
			
		||||
 | 
			
		||||
- [`DebertaForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb).
 | 
			
		||||
- [`TFDebertaForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb).
 | 
			
		||||
- [Token classification](https://huggingface.co/course/chapter7/2?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
- [Byte-Pair Encoding tokenization](https://huggingface.co/course/chapter6/5?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="fill-mask"/>
 | 
			
		||||
 | 
			
		||||
- [`DebertaForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
- [`TFDebertaForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
 | 
			
		||||
- [Masked language modeling](https://huggingface.co/course/chapter7/3?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="question-answering"/>
 | 
			
		||||
 | 
			
		||||
- [`DebertaForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb).
 | 
			
		||||
- [`TFDebertaForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb).
 | 
			
		||||
- [Question answering](https://huggingface.co/course/chapter7/7?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
## DebertaConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -23,38 +23,50 @@ The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- One can use the [`AutoFeatureExtractor`] API to prepare images (and optional targets) for the model. This will instantiate a [`DetrFeatureExtractor`] behind the scenes.
 | 
			
		||||
- Training Deformable DETR is equivalent to training the original [DETR](detr) model. Demo notebooks can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETR).
 | 
			
		||||
- One can use [`DeformableDetrImageProcessor`] to prepare images (and optional targets) for the model.
 | 
			
		||||
- Training Deformable DETR is equivalent to training the original [DETR](detr) model. See the [resources](#resources) section below for demo notebooks.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/deformable_detr_architecture.png"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Deformable DETR architecture. Taken from the <a href="https://arxiv.org/abs/2010.04159">original paper</a>.</small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/fundamentalvision/Deformable-DETR).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with Deformable DETR.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="object-detection"/>
 | 
			
		||||
 | 
			
		||||
- Demo notebooks regarding inference + fine-tuning on a custom dataset for [`DeformableDetrForObjectDetection`] can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Deformable-DETR).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## DeformableDetrImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeformableDetrImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
    - pad_and_create_pixel_mask
 | 
			
		||||
    - post_process_object_detection
 | 
			
		||||
 | 
			
		||||
## DeformableDetrFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeformableDetrFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
    - pad_and_create_pixel_mask
 | 
			
		||||
    - post_process
 | 
			
		||||
    - post_process_segmentation
 | 
			
		||||
    - post_process_panoptic
 | 
			
		||||
 | 
			
		||||
    - post_process_object_detection
 | 
			
		||||
 | 
			
		||||
## DeformableDetrConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeformableDetrConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## DeformableDetrModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeformableDetrModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## DeformableDetrForObjectDetection
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeformableDetrForObjectDetection
 | 
			
		||||
    - forward
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
@ -66,11 +66,24 @@ Tips:
 | 
			
		||||
  augmentation, optimization, and regularization were used in order to simulate training on a much larger dataset
 | 
			
		||||
  (while only using ImageNet-1k for pre-training). There are 4 variants available (in 3 different sizes):
 | 
			
		||||
  *facebook/deit-tiny-patch16-224*, *facebook/deit-small-patch16-224*, *facebook/deit-base-patch16-224* and
 | 
			
		||||
  *facebook/deit-base-patch16-384*. Note that one should use [`DeiTFeatureExtractor`] in order to
 | 
			
		||||
  *facebook/deit-base-patch16-384*. Note that one should use [`DeiTImageProcessor`] in order to
 | 
			
		||||
  prepare images for the model.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The TensorFlow version of this model was added by [amyeroberts](https://huggingface.co/amyeroberts).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DeiT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`DeiTForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
Besides that:
 | 
			
		||||
 | 
			
		||||
- [`DeiTForMaskedImageModeling`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## DeiTConfig
 | 
			
		||||
 | 
			
		||||
@ -81,6 +94,11 @@ This model was contributed by [nielsr](https://huggingface.co/nielsr). The Tenso
 | 
			
		||||
[[autodoc]] DeiTFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
## DeiTImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeiTImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## DeiTModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DeiTModel
 | 
			
		||||
 | 
			
		||||
@ -37,9 +37,6 @@ baselines.*
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/facebookresearch/detr).
 | 
			
		||||
 | 
			
		||||
The quickest way to get started with DETR is by checking the [example notebooks](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETR) (which showcase both inference and
 | 
			
		||||
fine-tuning on custom data).
 | 
			
		||||
 | 
			
		||||
Here's a TLDR explaining how [`~transformers.DetrForObjectDetection`] works:
 | 
			
		||||
 | 
			
		||||
First, an image is sent through a pre-trained convolutional backbone (in the paper, the authors use
 | 
			
		||||
@ -105,21 +102,21 @@ Tips:
 | 
			
		||||
- DETR resizes the input images such that the shortest side is at least a certain amount of pixels while the longest is
 | 
			
		||||
  at most 1333 pixels. At training time, scale augmentation is used such that the shortest side is randomly set to at
 | 
			
		||||
  least 480 and at most 800 pixels. At inference time, the shortest side is set to 800. One can use
 | 
			
		||||
  [`~transformers.DetrFeatureExtractor`] to prepare images (and optional annotations in COCO format) for the
 | 
			
		||||
  [`~transformers.DetrImageProcessor`] to prepare images (and optional annotations in COCO format) for the
 | 
			
		||||
  model. Due to this resizing, images in a batch can have different sizes. DETR solves this by padding images up to the
 | 
			
		||||
  largest size in a batch, and by creating a pixel mask that indicates which pixels are real/which are padding.
 | 
			
		||||
  Alternatively, one can also define a custom `collate_fn` in order to batch images together, using
 | 
			
		||||
  [`~transformers.DetrFeatureExtractor.pad_and_create_pixel_mask`].
 | 
			
		||||
  [`~transformers.DetrImageProcessor.pad_and_create_pixel_mask`].
 | 
			
		||||
- The size of the images will determine the amount of memory being used, and will thus determine the `batch_size`.
 | 
			
		||||
  It is advised to use a batch size of 2 per GPU. See [this Github thread](https://github.com/facebookresearch/detr/issues/150) for more info.
 | 
			
		||||
 | 
			
		||||
There are three ways to instantiate a DETR model (depending on what you prefer):
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
Option 1: Instantiate DETR with pre-trained weights for entire model
 | 
			
		||||
```py
 | 
			
		||||
>>> from transformers import DetrForObjectDetection
 | 
			
		||||
 | 
			
		||||
>>> model = DetrForObjectDetection.from_pretrained("facebook/resnet-50")
 | 
			
		||||
>>> model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Option 2: Instantiate DETR with randomly initialized weights for Transformer, but pre-trained weights for backbone
 | 
			
		||||
@ -142,17 +139,26 @@ As a summary, consider the following table:
 | 
			
		||||
| **Description** | Predicting bounding boxes and class labels around objects in an image | Predicting masks around objects (i.e. instances) in an image | Predicting masks around both objects (i.e. instances) as well as "stuff" (i.e. background things like trees and roads) in an image |
 | 
			
		||||
| **Model** | [`~transformers.DetrForObjectDetection`] | [`~transformers.DetrForSegmentation`] | [`~transformers.DetrForSegmentation`] |
 | 
			
		||||
| **Example dataset** | COCO detection | COCO detection, COCO panoptic | COCO panoptic  |                                                                        |
 | 
			
		||||
| **Format of annotations to provide to**  [`~transformers.DetrFeatureExtractor`] | {'image_id': `int`, 'annotations': `List[Dict]`} each Dict being a COCO object annotation  | {'image_id': `int`, 'annotations': `List[Dict]`}  (in case of COCO detection) or {'file_name': `str`, 'image_id': `int`, 'segments_info': `List[Dict]`} (in case of COCO panoptic) | {'file_name': `str`, 'image_id': `int`, 'segments_info': `List[Dict]`} and masks_path (path to directory containing PNG files of the masks) |
 | 
			
		||||
| **Postprocessing** (i.e. converting the output of the model to COCO API) | [`~transformers.DetrFeatureExtractor.post_process`] | [`~transformers.DetrFeatureExtractor.post_process_segmentation`] | [`~transformers.DetrFeatureExtractor.post_process_segmentation`], [`~transformers.DetrFeatureExtractor.post_process_panoptic`] |
 | 
			
		||||
| **Format of annotations to provide to**  [`~transformers.DetrImageProcessor`] | {'image_id': `int`, 'annotations': `List[Dict]`} each Dict being a COCO object annotation  | {'image_id': `int`, 'annotations': `List[Dict]`}  (in case of COCO detection) or {'file_name': `str`, 'image_id': `int`, 'segments_info': `List[Dict]`} (in case of COCO panoptic) | {'file_name': `str`, 'image_id': `int`, 'segments_info': `List[Dict]`} and masks_path (path to directory containing PNG files of the masks) |
 | 
			
		||||
| **Postprocessing** (i.e. converting the output of the model to COCO API) | [`~transformers.DetrImageProcessor.post_process`] | [`~transformers.DetrImageProcessor.post_process_segmentation`] | [`~transformers.DetrImageProcessor.post_process_segmentation`], [`~transformers.DetrImageProcessor.post_process_panoptic`] |
 | 
			
		||||
| **evaluators** | `CocoEvaluator` with `iou_types="bbox"` | `CocoEvaluator` with `iou_types="bbox"` or `"segm"` | `CocoEvaluator` with `iou_tupes="bbox"` or `"segm"`, `PanopticEvaluator` |
 | 
			
		||||
 | 
			
		||||
In short, one should prepare the data either in COCO detection or COCO panoptic format, then use
 | 
			
		||||
[`~transformers.DetrFeatureExtractor`] to create `pixel_values`, `pixel_mask` and optional
 | 
			
		||||
[`~transformers.DetrImageProcessor`] to create `pixel_values`, `pixel_mask` and optional
 | 
			
		||||
`labels`, which can then be used to train (or fine-tune) a model. For evaluation, one should first convert the
 | 
			
		||||
outputs of the model using one of the postprocessing methods of [`~transformers.DetrFeatureExtractor`]. These can
 | 
			
		||||
outputs of the model using one of the postprocessing methods of [`~transformers.DetrImageProcessor`]. These can
 | 
			
		||||
be be provided to either `CocoEvaluator` or `PanopticEvaluator`, which allow you to calculate metrics like
 | 
			
		||||
mean Average Precision (mAP) and Panoptic Quality (PQ). The latter objects are implemented in the [original repository](https://github.com/facebookresearch/detr). See the [example notebooks](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETR) for more info regarding evaluation.
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DETR.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="object-detection"/>
 | 
			
		||||
 | 
			
		||||
- All example notebooks illustrating fine-tuning [`DetrForObjectDetection`] and [`DetrForSegmentation`] on a custom dataset an be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DETR).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## DETR specific outputs
 | 
			
		||||
 | 
			
		||||
@ -166,6 +172,15 @@ mean Average Precision (mAP) and Panoptic Quality (PQ). The latter objects are i
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DetrConfig
 | 
			
		||||
 | 
			
		||||
## DetrImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DetrImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
    - post_process_object_detection
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
    - post_process_instance_segmentation
 | 
			
		||||
    - post_process_panoptic_segmentation
 | 
			
		||||
 | 
			
		||||
## DetrFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DetrFeatureExtractor
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										86
									
								
								docs/source/en/model_doc/dinat.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								docs/source/en/model_doc/dinat.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,86 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Dilated Neighborhood Attention Transformer
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
DiNAT was proposed in [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001)
 | 
			
		||||
by Ali Hassani and Humphrey Shi.
 | 
			
		||||
 | 
			
		||||
It extends [NAT](nat) by adding a Dilated Neighborhood Attention pattern to capture global context,
 | 
			
		||||
and shows significant performance improvements over it.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Transformers are quickly becoming one of the most heavily applied deep learning architectures across modalities,
 | 
			
		||||
domains, and tasks. In vision, on top of ongoing efforts into plain transformers, hierarchical transformers have
 | 
			
		||||
also gained significant attention, thanks to their performance and easy integration into existing frameworks.
 | 
			
		||||
These models typically employ localized attention mechanisms, such as the sliding-window Neighborhood Attention (NA)
 | 
			
		||||
or Swin Transformer's Shifted Window Self Attention. While effective at reducing self attention's quadratic complexity,
 | 
			
		||||
local attention weakens two of the most desirable properties of self attention: long range inter-dependency modeling,
 | 
			
		||||
and global receptive field. In this paper, we introduce Dilated Neighborhood Attention (DiNA), a natural, flexible and
 | 
			
		||||
efficient extension to NA that can capture more global context and expand receptive fields exponentially at no
 | 
			
		||||
additional cost. NA's local attention and DiNA's sparse global attention complement each other, and therefore we
 | 
			
		||||
introduce Dilated Neighborhood Attention Transformer (DiNAT), a new hierarchical vision transformer built upon both.
 | 
			
		||||
DiNAT variants enjoy significant improvements over strong baselines such as NAT, Swin, and ConvNeXt.
 | 
			
		||||
Our large model is faster and ahead of its Swin counterpart by 1.5% box AP in COCO object detection,
 | 
			
		||||
1.3% mask AP in COCO instance segmentation, and 1.1% mIoU in ADE20K semantic segmentation.
 | 
			
		||||
Paired with new frameworks, our large variant is the new state of the art panoptic segmentation model on COCO (58.2 PQ)
 | 
			
		||||
and ADE20K (48.5 PQ), and instance segmentation model on Cityscapes (44.5 AP) and ADE20K (35.4 AP) (no extra data).
 | 
			
		||||
It also matches the state of the art specialized semantic segmentation models on ADE20K (58.2 mIoU),
 | 
			
		||||
and ranks second on Cityscapes (84.5 mIoU) (no extra data). *
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
- One can use the [`AutoImageProcessor`] API to prepare images for the model.
 | 
			
		||||
- DiNAT can be used as a *backbone*. When `output_hidden_states = True`,
 | 
			
		||||
it will output both `hidden_states` and `reshaped_hidden_states`. The `reshaped_hidden_states` have a shape of `(batch, num_channels, height, width)` rather than `(batch_size, height, width, num_channels)`.
 | 
			
		||||
 | 
			
		||||
Notes:
 | 
			
		||||
- DiNAT depends on [NATTEN](https://github.com/SHI-Labs/NATTEN/)'s implementation of Neighborhood Attention and Dilated Neighborhood Attention.
 | 
			
		||||
You can install it with pre-built wheels for Linux by referring to [shi-labs.com/natten](https://shi-labs.com/natten), or build on your system by running `pip install natten`.
 | 
			
		||||
Note that the latter will likely take time to compile. NATTEN does not support Windows devices yet.
 | 
			
		||||
- Patch size of 4 is only supported at the moment.
 | 
			
		||||
 | 
			
		||||
<img
 | 
			
		||||
src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dilated-neighborhood-attention-pattern.jpg"
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Neighborhood Attention with different dilation values.
 | 
			
		||||
Taken from the <a href="https://arxiv.org/abs/2209.15001">original paper</a>.</small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [Ali Hassani](https://huggingface.co/alihassanijr).
 | 
			
		||||
The original code can be found [here](https://github.com/SHI-Labs/Neighborhood-Attention-Transformer).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DiNAT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`DinatForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## DinatConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DinatConfig
 | 
			
		||||
 | 
			
		||||
## DinatModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DinatModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## DinatForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DinatForImageClassification
 | 
			
		||||
    - forward
 | 
			
		||||
@ -45,6 +45,66 @@ Tips:
 | 
			
		||||
This model was contributed by [victorsanh](https://huggingface.co/victorsanh). This model jax version was
 | 
			
		||||
contributed by [kamalkraj](https://huggingface.co/kamalkraj). The original code can be found [here](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DistilBERT. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="text-classification"/>
 | 
			
		||||
 | 
			
		||||
- A blog post on [Getting Started with Sentiment Analysis using Python](https://huggingface.co/blog/sentiment-analysis-python) with DistilBERT.
 | 
			
		||||
- A blog post on how to [train DistilBERT with Blurr for sequence classification](https://huggingface.co/blog/fastai).
 | 
			
		||||
- A blog post on how to use [Ray to tune DistilBERT hyperparameters](https://huggingface.co/blog/ray-tune).
 | 
			
		||||
- A blog post on how to [train DistilBERT with Hugging Face and Amazon SageMaker](https://huggingface.co/blog/the-partnership-amazon-sagemaker-and-hugging-face).
 | 
			
		||||
- A notebook on how to [finetune DistilBERT for multi-label classification](https://colab.research.google.com/github/DhavalTaunk08/Transformers_scripts/blob/master/Transformers_multilabel_distilbert.ipynb). 🌎
 | 
			
		||||
- A notebook on how to [finetune DistilBERT for multiclass classification with PyTorch](https://colab.research.google.com/github/abhimishra91/transformers-tutorials/blob/master/transformers_multiclass_classification.ipynb). 🌎
 | 
			
		||||
- A notebook on how to [finetune DistilBERT for text classification in TensorFlow](https://colab.research.google.com/github/peterbayerle/huggingface_notebook/blob/main/distilbert_tf.ipynb). 🌎
 | 
			
		||||
- [`DistilBertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb).
 | 
			
		||||
- [`TFDistilBertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb).
 | 
			
		||||
- [`FlaxDistilBertForSequenceClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="token-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`DistilBertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb).
 | 
			
		||||
- [`TFDistilBertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb).
 | 
			
		||||
- [`FlaxDistilBertForTokenClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification).
 | 
			
		||||
- [Token classification](https://huggingface.co/course/chapter7/2?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="fill-mask"/>
 | 
			
		||||
 | 
			
		||||
- [`DistilBertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
- [`TFDistilBertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
 | 
			
		||||
- [`FlaxDistilBertForMaskedLM`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb).
 | 
			
		||||
- [Masked language modeling](https://huggingface.co/course/chapter7/3?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="question-answering"/>
 | 
			
		||||
 | 
			
		||||
- [`DistilBertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb).
 | 
			
		||||
- [`TFDistilBertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb).
 | 
			
		||||
- [`FlaxDistilBertForQuestionAnswering`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering).
 | 
			
		||||
- [Question answering](https://huggingface.co/course/chapter7/7?fw=pt) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
 | 
			
		||||
**Multiple choice**
 | 
			
		||||
- [`DistilBertForMultipleChoice`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb).
 | 
			
		||||
- [`TFDistilBertForMultipleChoice`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb).
 | 
			
		||||
 | 
			
		||||
⚗️ Optimization
 | 
			
		||||
 | 
			
		||||
- A blog post on how to [quantize DistilBERT with 🤗 Optimum and Intel](https://huggingface.co/blog/intel).
 | 
			
		||||
- A blog post on how [Optimizing Transformers for GPUs with 🤗 Optimum](https://www.philschmid.de/optimizing-transformers-with-optimum-gpu).
 | 
			
		||||
- A blog post on [Optimizing Transformers with Hugging Face Optimum](https://www.philschmid.de/optimizing-transformers-with-optimum).
 | 
			
		||||
 | 
			
		||||
⚡️ Inference
 | 
			
		||||
 | 
			
		||||
- A blog post on how to [Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia](https://huggingface.co/blog/bert-inferentia-sagemaker) with DistilBERT.
 | 
			
		||||
- A blog post on [Serverless Inference with Hugging Face's Transformers, DistilBERT and Amazon SageMaker](https://www.philschmid.de/sagemaker-serverless-huggingface-distilbert).
 | 
			
		||||
 | 
			
		||||
🚀 Deploy
 | 
			
		||||
 | 
			
		||||
- A blog post on how to [deploy DistilBERT on Google Cloud](https://huggingface.co/blog/how-to-deploy-a-pipeline-to-google-clouds).
 | 
			
		||||
- A blog post on how to [deploy DistilBERT with Amazon SageMaker](https://huggingface.co/blog/deploy-hugging-face-models-easily-with-amazon-sagemaker).
 | 
			
		||||
- A blog post on how to [Deploy BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module](https://www.philschmid.de/terraform-huggingface-amazon-sagemaker).
 | 
			
		||||
 | 
			
		||||
## DistilBertConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -64,4 +64,14 @@ A notebook that illustrates inference for document image classification can be f
 | 
			
		||||
 | 
			
		||||
As DiT's architecture is equivalent to that of BEiT, one can refer to [BEiT's documentation page](beit) for all tips, code examples and notebooks.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/microsoft/unilm/tree/master/dit).
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/microsoft/unilm/tree/master/dit).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DiT.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="image-classification"/>
 | 
			
		||||
 | 
			
		||||
- [`BeitForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
@ -23,7 +23,7 @@ The abstract from the paper is the following:
 | 
			
		||||
*Understanding document images (e.g., invoices) is a core but challenging task since it requires complex functions such as reading text and a holistic understanding of the document. Current Visual Document Understanding (VDU) methods outsource the task of reading text to off-the-shelf Optical Character Recognition (OCR) engines and focus on the understanding task with the OCR outputs. Although such OCR-based approaches have shown promising performance, they suffer from 1) high computational costs for using OCR; 2) inflexibility of OCR models on languages or types of document; 3) OCR error propagation to the subsequent process. To address these issues, in this paper, we introduce a novel OCR-free VDU model named Donut, which stands for Document understanding transformer. As the first step in OCR-free VDU research, we propose a simple architecture (i.e., Transformer) with a pre-training objective (i.e., cross-entropy loss). Donut is conceptually simple yet effective. Through extensive experiments and analyses, we show a simple OCR-free VDU model, Donut, achieves state-of-the-art performances on various VDU tasks in terms of both speed and accuracy. In addition, we offer a synthetic data generator that helps the model pre-training to be flexible in various languages and domains.*
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/donut_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Donut high-level overview. Taken from the <a href="https://arxiv.org/abs/2111.15664">original paper</a>. </small>
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,7 @@ Tips:
 | 
			
		||||
## Inference
 | 
			
		||||
 | 
			
		||||
Donut's [`VisionEncoderDecoder`] model accepts images as input and makes use of
 | 
			
		||||
[`~generation_utils.GenerationMixin.generate`] to autoregressively generate text given the input image.
 | 
			
		||||
[`~generation.GenerationMixin.generate`] to autoregressively generate text given the input image.
 | 
			
		||||
 | 
			
		||||
The [`DonutFeatureExtractor`] class is responsible for preprocessing the input image and
 | 
			
		||||
[`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`] decodes the generated target tokens to the target string. The
 | 
			
		||||
@ -194,6 +194,11 @@ We refer to the [tutorial notebooks](https://github.com/NielsRogge/Transformers-
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DonutSwinConfig
 | 
			
		||||
 | 
			
		||||
## DonutImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DonutImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## DonutFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DonutFeatureExtractor
 | 
			
		||||
@ -211,4 +216,4 @@ We refer to the [tutorial notebooks](https://github.com/NielsRogge/Transformers-
 | 
			
		||||
## DonutSwinModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DonutSwinModel
 | 
			
		||||
    - forward
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
@ -22,37 +22,47 @@ The abstract from the paper is the following:
 | 
			
		||||
*We introduce dense vision transformers, an architecture that leverages vision transformers in place of convolutional networks as a backbone for dense prediction tasks. We assemble tokens from various stages of the vision transformer into image-like representations at various resolutions and progressively combine them into full-resolution predictions using a convolutional decoder. The transformer backbone processes representations at a constant and relatively high resolution and has a global receptive field at every stage. These properties allow the dense vision transformer to provide finer-grained and more globally coherent predictions when compared to fully-convolutional networks. Our experiments show that this architecture yields substantial improvements on dense prediction tasks, especially when a large amount of training data is available. For monocular depth estimation, we observe an improvement of up to 28% in relative performance when compared to a state-of-the-art fully-convolutional network. When applied to semantic segmentation, dense vision transformers set a new state of the art on ADE20K with 49.02% mIoU. We further show that the architecture can be fine-tuned on smaller datasets such as NYUv2, KITTI, and Pascal Context where it also sets the new state of the art.*
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dpt_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> DPT architecture. Taken from the <a href="https://arxiv.org/abs/2103.13413" target="_blank">original paper</a>. </small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/isl-org/DPT).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DPT.
 | 
			
		||||
 | 
			
		||||
- Demo notebooks for [`DPTForDepthEstimation`] can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/DPT).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## DPTConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTConfig
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## DPTFeatureExtractor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
 | 
			
		||||
## DPTImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
    - post_process_semantic_segmentation
 | 
			
		||||
 | 
			
		||||
## DPTModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## DPTForDepthEstimation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTForDepthEstimation
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## DPTForSemanticSegmentation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] DPTForSemanticSegmentation
 | 
			
		||||
    - forward
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										65
									
								
								docs/source/en/model_doc/efficientformer.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								docs/source/en/model_doc/efficientformer.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,65 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# EfficientFormer
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The EfficientFormer model was proposed in [EfficientFormer: Vision Transformers at MobileNet Speed](https://arxiv.org/abs/2206.01191) 
 | 
			
		||||
by Yanyu Li, Geng Yuan, Yang Wen, Eric Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, Jian Ren.  EfficientFormer proposes a
 | 
			
		||||
dimension-consistent pure transformer that can be run on mobile devices for dense prediction tasks like image classification, object
 | 
			
		||||
detection and semantic segmentation.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*Vision Transformers (ViT) have shown rapid progress in computer vision tasks, achieving promising results on various benchmarks. 
 | 
			
		||||
However, due to the massive number of parameters and model design, e.g., attention mechanism, ViT-based models are generally 
 | 
			
		||||
times slower than lightweight convolutional networks. Therefore, the deployment of ViT for real-time applications is particularly 
 | 
			
		||||
challenging, especially on resource-constrained hardware such as mobile devices. Recent efforts try to reduce the computation 
 | 
			
		||||
complexity of ViT through network architecture search or hybrid design with MobileNet block, yet the inference speed is still 
 | 
			
		||||
unsatisfactory. This leads to an important question: can transformers run as fast as MobileNet while obtaining high performance? 
 | 
			
		||||
To answer this, we first revisit the network architecture and operators used in ViT-based models and identify inefficient designs. 
 | 
			
		||||
Then we introduce a dimension-consistent pure transformer (without MobileNet blocks) as a design paradigm. 
 | 
			
		||||
Finally, we perform latency-driven slimming to get a series of final models dubbed EfficientFormer. 
 | 
			
		||||
Extensive experiments show the superiority of EfficientFormer in performance and speed on mobile devices. 
 | 
			
		||||
Our fastest model, EfficientFormer-L1, achieves 79.2% top-1 accuracy on ImageNet-1K with only 1.6 ms inference latency on 
 | 
			
		||||
iPhone 12 (compiled with CoreML), which { runs as fast as MobileNetV2×1.4 (1.6 ms, 74.7% top-1),} and our largest model, 
 | 
			
		||||
EfficientFormer-L7, obtains 83.3% accuracy with only 7.0 ms latency. Our work proves that properly designed transformers can 
 | 
			
		||||
reach extremely low latency on mobile devices while maintaining high performance.*
 | 
			
		||||
 | 
			
		||||
This model was contributed by [novice03](https://huggingface.co/novice03) and [Bearnardd](https://huggingface.co/Bearnardd).
 | 
			
		||||
The original code can be found [here](https://github.com/snap-research/EfficientFormer).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## EfficientFormerConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EfficientFormerConfig
 | 
			
		||||
 | 
			
		||||
## EfficientFormerImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EfficientFormerImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## EfficientFormerModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EfficientFormerModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## EfficientFormerForImageClassification
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EfficientFormerForImageClassification
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## EfficientFormerForImageClassificationWithTeacher
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EfficientFormerForImageClassificationWithTeacher
 | 
			
		||||
    - forward
 | 
			
		||||
@ -14,8 +14,8 @@ specific language governing permissions and limitations under the License.
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
This page provides code and pre-trained weights for Transformer protein language models from Meta AI's Fundamental 
 | 
			
		||||
AI Research Team, providing the state-of-the-art ESM-2, and the previously released ESM-1b and ESM-1v. Transformer 
 | 
			
		||||
protein language models were introduced in the paper [Biological structure and function emerge from scaling 
 | 
			
		||||
AI Research Team, providing the state-of-the-art ESMFold and ESM-2, and the previously released ESM-1b and ESM-1v.
 | 
			
		||||
Transformer protein language models were introduced in the paper [Biological structure and function emerge from scaling
 | 
			
		||||
unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by 
 | 
			
		||||
Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, 
 | 
			
		||||
C. Lawrence Zitnick, Jerry Ma, and Rob Fergus.
 | 
			
		||||
@ -27,6 +27,13 @@ It was released with the paper [Language models of protein sequences at the scal
 | 
			
		||||
structure prediction](https://doi.org/10.1101/2022.07.20.500902) by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie,
 | 
			
		||||
Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido and Alexander Rives.
 | 
			
		||||
 | 
			
		||||
Also introduced in this paper was ESMFold. It uses an ESM-2 stem with a head that can predict folded protein
 | 
			
		||||
structures with state-of-the-art accuracy. Unlike [AlphaFold2](https://www.nature.com/articles/s41586-021-03819-2),
 | 
			
		||||
it relies on the token embeddings from the large pre-trained protein language model stem and does not perform a multiple
 | 
			
		||||
sequence alignment (MSA) step at inference time, which means that ESMFold checkpoints are fully "standalone" -
 | 
			
		||||
they do not require a database of known protein sequences and structures with associated external query tools
 | 
			
		||||
to make predictions, and are much faster as a result.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The abstract from 
 | 
			
		||||
"Biological structure and function emerge from scaling unsupervised learning to 250 
 | 
			
		||||
@ -63,17 +70,22 @@ order of magnitude faster than AlphaFold2, enabling exploration of the structura
 | 
			
		||||
proteins in practical timescales.*
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- ESM models are trained with a masked language modeling (MLM) objective.
 | 
			
		||||
 | 
			
		||||
The original code can be found [here](https://github.com/facebookresearch/esm) and was
 | 
			
		||||
was developed by the Fundamental AI Research team at Meta AI.
 | 
			
		||||
This model was contributed to huggingface by [jasonliu](https://huggingface.co/jasonliu) 
 | 
			
		||||
ESM-1b, ESM-1v and ESM-2 were contributed to huggingface by [jasonliu](https://huggingface.co/jasonliu)
 | 
			
		||||
and [Matt](https://huggingface.co/Rocketknight1).
 | 
			
		||||
 | 
			
		||||
ESMFold was contributed to huggingface by [Matt](https://huggingface.co/Rocketknight1) and
 | 
			
		||||
[Sylvain](https://huggingface.co/sgugger), with a big thank you to Nikita Smetanin, Roshan Rao and Tom Sercu for their
 | 
			
		||||
help throughout the process!
 | 
			
		||||
 | 
			
		||||
The HuggingFace port of ESMFold uses portions of the [openfold](https://github.com/aqlaboratory/openfold) library.
 | 
			
		||||
The `openfold` library is licensed under the Apache License 2.0.
 | 
			
		||||
 | 
			
		||||
## EsmConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EsmConfig
 | 
			
		||||
@ -108,6 +120,11 @@ and [Matt](https://huggingface.co/Rocketknight1).
 | 
			
		||||
[[autodoc]] EsmForTokenClassification
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## EsmForProteinFolding
 | 
			
		||||
 | 
			
		||||
[[autodoc]] EsmForProteinFolding
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## TFEsmModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFEsmModel
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										49
									
								
								docs/source/en/model_doc/flan-t5.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								docs/source/en/model_doc/flan-t5.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,49 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# FLAN-T5
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
FLAN-T5 was released in the paper [Scaling Instruction-Finetuned Language Models](https://arxiv.org/pdf/2210.11416.pdf) - it is an enhanced version of T5 that has been finetuned in a mixture of tasks.
 | 
			
		||||
 | 
			
		||||
One can directly use FLAN-T5 weights without finetuning the model:
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
 | 
			
		||||
 | 
			
		||||
>>> model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-small")
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-small")
 | 
			
		||||
 | 
			
		||||
>>> inputs = tokenizer("A step by step recipe to make bolognese pasta:", return_tensors="pt")
 | 
			
		||||
>>> outputs = model.generate(**inputs)
 | 
			
		||||
>>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
 | 
			
		||||
['Pour a cup of bolognese into a large bowl and add the pasta']
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
FLAN-T5 includes the same improvements as T5 version 1.1 (see [here](https://huggingface.co/docs/transformers/model_doc/t5v1.1) for the full details of the model's improvements.)
 | 
			
		||||
 | 
			
		||||
Google has released the following variants:
 | 
			
		||||
 | 
			
		||||
- [google/flan-t5-small](https://huggingface.co/google/flan-t5-small)
 | 
			
		||||
 | 
			
		||||
- [google/flan-t5-base](https://huggingface.co/google/flan-t5-base)
 | 
			
		||||
 | 
			
		||||
- [google/flan-t5-large](https://huggingface.co/google/flan-t5-large)
 | 
			
		||||
 | 
			
		||||
- [google/flan-t5-xl](https://huggingface.co/google/flan-t5-xl)
 | 
			
		||||
 | 
			
		||||
- [google/flan-t5-xxl](https://huggingface.co/google/flan-t5-xxl).
 | 
			
		||||
 | 
			
		||||
One can refer to [T5's documentation page](t5) for all tips, code examples and notebooks. As well as the FLAN-T5 model card for more details regarding training and evaluation of the model.
 | 
			
		||||
 | 
			
		||||
The original checkpoints can be found [here](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints).
 | 
			
		||||
@ -16,17 +16,17 @@ specific language governing permissions and limitations under the License.
 | 
			
		||||
 | 
			
		||||
The FLAVA model was proposed in [FLAVA: A Foundational Language And Vision Alignment Model](https://arxiv.org/abs/2112.04482) by Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela and is accepted at CVPR 2022.
 | 
			
		||||
 | 
			
		||||
The paper aims at creating a single unified foundation model which can work across vision, language 
 | 
			
		||||
The paper aims at creating a single unified foundation model which can work across vision, language
 | 
			
		||||
as well as vision-and-language multimodal tasks.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety 
 | 
			
		||||
of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal 
 | 
			
		||||
(with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising 
 | 
			
		||||
direction would be to use a single holistic universal model, as a "foundation", that targets all modalities 
 | 
			
		||||
at once -- a true vision and language foundation model should be good at vision tasks, language tasks, and 
 | 
			
		||||
cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate 
 | 
			
		||||
*State-of-the-art vision and vision-and-language models rely on large-scale visio-linguistic pretraining for obtaining good performance on a variety
 | 
			
		||||
of downstream tasks. Generally, such models are often either cross-modal (contrastive) or multi-modal
 | 
			
		||||
(with earlier fusion) but not both; and they often only target specific modalities or tasks. A promising
 | 
			
		||||
direction would be to use a single holistic universal model, as a "foundation", that targets all modalities
 | 
			
		||||
at once -- a true vision and language foundation model should be good at vision tasks, language tasks, and
 | 
			
		||||
cross- and multi-modal vision and language tasks. We introduce FLAVA as such a model and demonstrate
 | 
			
		||||
impressive performance on a wide range of 35 tasks spanning these target modalities.*
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -61,6 +61,11 @@ This model was contributed by [aps](https://huggingface.co/aps). The original co
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlavaFeatureExtractor
 | 
			
		||||
 | 
			
		||||
## FlavaImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlavaImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## FlavaForPreTraining
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlavaForPreTraining
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										75
									
								
								docs/source/en/model_doc/git.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								docs/source/en/model_doc/git.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,75 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# GIT
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The GIT model was proposed in [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by
 | 
			
		||||
Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, Lijuan Wang. GIT is a decoder-only Transformer
 | 
			
		||||
that leverages [CLIP](clip)'s vision encoder to condition the model on vision inputs besides text. The model obtains state-of-the-art results on
 | 
			
		||||
image captioning and visual question answering benchmarks.
 | 
			
		||||
 | 
			
		||||
The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
*In this paper, we design and train a Generative Image-to-text Transformer, GIT, to unify vision-language tasks such as image/video captioning and question answering. While generative models provide a consistent network architecture between pre-training and fine-tuning, existing work typically contains complex structures (uni/multi-modal encoder/decoder) and depends on external modules such as object detectors/taggers and optical character recognition (OCR). In GIT, we simplify the architecture as one image encoder and one text decoder under a single language modeling task. We also scale up the pre-training data and the model size to boost the model performance. Without bells and whistles, our GIT establishes new state of the arts on 12 challenging benchmarks with a large margin. For instance, our model surpasses the human performance for the first time on TextCaps (138.2 vs. 125.5 in CIDEr). Furthermore, we present a new scheme of generation-based image classification and scene text recognition, achieving decent performance on standard benchmarks.*
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- GIT is implemented in a very similar way to GPT-2, the only difference being that the model is also conditioned on `pixel_values`.
 | 
			
		||||
- One can use [`GitProcessor`] to prepare images for the model, and the `generate` method for autoregressive generation.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/git_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> GIT architecture. Taken from the <a href="https://arxiv.org/abs/2205.14100" target="_blank">original paper</a>. </small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr).
 | 
			
		||||
The original code can be found [here](https://github.com/microsoft/GenerativeImage2Text).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GIT.
 | 
			
		||||
 | 
			
		||||
- Demo notebooks regarding inference + fine-tuning GIT on custom data can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/GIT).
 | 
			
		||||
 | 
			
		||||
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it.
 | 
			
		||||
The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
## GitVisionConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitVisionConfig
 | 
			
		||||
 | 
			
		||||
## GitVisionModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitVisionModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## GitConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitConfig
 | 
			
		||||
    - all
 | 
			
		||||
 | 
			
		||||
## GitProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitProcessor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
## GitModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitModel
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
## GitForCausalLM
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GitForCausalLM
 | 
			
		||||
    - forward
 | 
			
		||||
@ -31,16 +31,21 @@ The abstract from the paper is the following:
 | 
			
		||||
 | 
			
		||||
Tips:
 | 
			
		||||
 | 
			
		||||
- A notebook illustrating inference with [`GLPNForDepthEstimation`] can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/GLPN/GLPN_inference_(depth_estimation).ipynb).
 | 
			
		||||
- One can use [`GLPNFeatureExtractor`] to prepare images for the model.
 | 
			
		||||
- One can use [`GLPNImageProcessor`] to prepare images for the model.
 | 
			
		||||
 | 
			
		||||
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/glpn_architecture.jpg"
 | 
			
		||||
alt="drawing" width="600"/> 
 | 
			
		||||
alt="drawing" width="600"/>
 | 
			
		||||
 | 
			
		||||
<small> Summary of the approach. Taken from the <a href="https://arxiv.org/abs/2201.07436" target="_blank">original paper</a>. </small>
 | 
			
		||||
 | 
			
		||||
This model was contributed by [nielsr](https://huggingface.co/nielsr). The original code can be found [here](https://github.com/vinvino02/GLPDepth).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GLPN.
 | 
			
		||||
 | 
			
		||||
- Demo notebooks for [`GLPNForDepthEstimation`] can be found [here](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/GLPN).
 | 
			
		||||
 | 
			
		||||
## GLPNConfig
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GLPNConfig
 | 
			
		||||
@ -50,6 +55,11 @@ This model was contributed by [nielsr](https://huggingface.co/nielsr). The origi
 | 
			
		||||
[[autodoc]] GLPNFeatureExtractor
 | 
			
		||||
    - __call__
 | 
			
		||||
 | 
			
		||||
## GLPNImageProcessor
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GLPNImageProcessor
 | 
			
		||||
    - preprocess
 | 
			
		||||
 | 
			
		||||
## GLPNModel
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GLPNModel
 | 
			
		||||
@ -58,4 +68,4 @@ This model was contributed by [nielsr](https://huggingface.co/nielsr). The origi
 | 
			
		||||
## GLPNForDepthEstimation
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GLPNForDepthEstimation
 | 
			
		||||
    - forward
 | 
			
		||||
    - forward
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										54
									
								
								docs/source/en/model_doc/gpt-sw3.mdx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								docs/source/en/model_doc/gpt-sw3.mdx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,54 @@
 | 
			
		||||
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
 | 
			
		||||
 | 
			
		||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 | 
			
		||||
the License. You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 | 
			
		||||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 | 
			
		||||
specific language governing permissions and limitations under the License.
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# GPT-Sw3
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
The GPT-Sw3 model was first proposed in
 | 
			
		||||
[Lessons Learned from GPT-SW3: Building the First Large-Scale Generative Language Model for Swedish](http://www.lrec-conf.org/proceedings/lrec2022/pdf/2022.lrec-1.376.pdf)
 | 
			
		||||
by Ariel Ekgren, Amaru Cuba Gyllensten, Evangelia Gogoulou, Alice Heiman, Severine Verlinden, Joey Öhman,
 | 
			
		||||
Fredrik Carlsson, Magnus Sahlgren.
 | 
			
		||||
 | 
			
		||||
Since that first paper the authors have extended their work and trained new models on their new 1.2TB corpora named The Nordic Pile.
 | 
			
		||||
 | 
			
		||||
GPT-Sw3 is a collection of large decoder-only pretrained transformer language models that were developed by AI Sweden
 | 
			
		||||
in collaboration with RISE and the WASP WARA for Media and Language. GPT-Sw3 has been trained on a dataset containing
 | 
			
		||||
320B tokens in Swedish, Norwegian, Danish, Icelandic, English, and programming code. The model was pretrained using a
 | 
			
		||||
causal language modeling (CLM) objective utilizing the NeMo Megatron GPT implementation.
 | 
			
		||||
 | 
			
		||||
This model was contributed by [AI Sweden](https://huggingface.co/AI-Sweden).
 | 
			
		||||
 | 
			
		||||
The implementation uses the [GPT2Model](https://huggingface.co/docs/transformers/model_doc/gpt2) coupled
 | 
			
		||||
with our `GPTSw3Tokenizer`. This means that `AutoTokenizer` and `AutoModelForCausalLM` map to our tokenizer
 | 
			
		||||
implementation and the corresponding GPT2 model implementation respectively.
 | 
			
		||||
*Note that sentencepiece is required to use our tokenizer and can be installed with:* `pip install transformers[sentencepiece]` or `pip install sentencepiece`
 | 
			
		||||
 | 
			
		||||
Example usage:
 | 
			
		||||
```python
 | 
			
		||||
>>> from transformers import AutoTokenizer, AutoModelForCausalLM
 | 
			
		||||
 | 
			
		||||
>>> tokenizer = AutoTokenizer.from_pretrained("AI-Sweden/gpt-sw3-356m")
 | 
			
		||||
>>> model = AutoModelForCausalLM.from_pretrained("AI-Sweden/gpt-sw3-356m")
 | 
			
		||||
 | 
			
		||||
>>> input_ids = tokenizer("Träd är fina för att", return_tensors="pt")["input_ids"]
 | 
			
		||||
 | 
			
		||||
>>> generated_token_ids = model.generate(inputs=input_ids, max_new_tokens=10, do_sample=True)[0]
 | 
			
		||||
 | 
			
		||||
>>> print(tokenizer.decode(generated_token_ids))
 | 
			
		||||
Träd är fina för att de är färgstarka. Men ibland är det fint
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## GPTSw3Tokenizer
 | 
			
		||||
 | 
			
		||||
[[autodoc]] GPTSw3Tokenizer
 | 
			
		||||
    - save_vocabulary
 | 
			
		||||
@ -47,6 +47,24 @@ different sizes: small, medium, large, xl and a distilled version of the small c
 | 
			
		||||
 | 
			
		||||
This model was contributed by [thomwolf](https://huggingface.co/thomwolf). The original code can be found [here](https://openai.com/blog/better-language-models/).
 | 
			
		||||
 | 
			
		||||
## Resources
 | 
			
		||||
 | 
			
		||||
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with GPT2. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
 | 
			
		||||
 | 
			
		||||
<PipelineTag pipeline="text-generation"/>
 | 
			
		||||
 | 
			
		||||
- A blog on how to [Finetune a non-English GPT-2 Model with Hugging Face](https://www.philschmid.de/fine-tune-a-non-english-gpt-2-model-with-huggingface).
 | 
			
		||||
- A blog on [How to generate text: using different decoding methods for language generation with Transformers](https://huggingface.co/blog/how-to-generate) with GPT-2.
 | 
			
		||||
- A blog on [Training CodeParrot 🦜 from Scratch](https://huggingface.co/blog/codeparrot), a large GPT-2 model.
 | 
			
		||||
- A blog on [Faster Text Generation with TensorFlow and XLA](https://huggingface.co/blog/tf-xla-generate) with GPT-2.
 | 
			
		||||
- A blog on [How to train a Language Model with Megatron-LM](https://huggingface.co/blog/megatron-training) with a GPT-2 model.
 | 
			
		||||
- A notebook on how to [finetune GPT2 to generate lyrics in the style of your favorite artist](https://colab.research.google.com/github/AlekseyKorshuk/huggingartists/blob/master/huggingartists-demo.ipynb). 🌎
 | 
			
		||||
- A notebook on how to [finetune GPT2 to generate tweets in the style of your favorite Twitter user](https://colab.research.google.com/github/borisdayma/huggingtweets/blob/master/huggingtweets-demo.ipynb). 🌎
 | 
			
		||||
- [Causal language modeling](https://huggingface.co/course/en/chapter7/6?fw=pt#training-a-causal-language-model-from-scratch) chapter of the 🤗 Hugging Face Course.
 | 
			
		||||
- [`GPT2LMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling), [text generation example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-generation), and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb).
 | 
			
		||||
- [`TFGPT2LMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_clmpy) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
 | 
			
		||||
- [`FlaxGPT2LMHeadModel`] is supported by this [causal language modeling example script](https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#causal-language-modeling) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/causal_language_modeling_flax.ipynb).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## GPT2Config
 | 
			
		||||
 | 
			
		||||
@ -120,6 +138,10 @@ This model was contributed by [thomwolf](https://huggingface.co/thomwolf). The o
 | 
			
		||||
 | 
			
		||||
[[autodoc]] modeling_tf_outputs.TFSequenceClassifierOutputWithPast
 | 
			
		||||
 | 
			
		||||
## TFGPT2Tokenizer
 | 
			
		||||
 | 
			
		||||
[[autodoc]] TFGPT2Tokenizer
 | 
			
		||||
 | 
			
		||||
## FlaxGPT2Model
 | 
			
		||||
 | 
			
		||||
[[autodoc]] FlaxGPT2Model
 | 
			
		||||
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user