adding positional encoder changes and tests (#32600)
* adding positional encoder changes and tests
* adding ruff suggestions
* changes added by python utils/check_copies.py --fix_and_overwrite
* removing pos_encoding added by script
* adding interpolation to clipseg
* formatting
* adding further testing to altclip and better documentation to kosmos2
* skipping test_inputs_embeds_matches_input_ids_with_generate in git model
* fixing clipseg comment suggestions
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* fixing bridgetower test
* fixing altclip tensor output POS test
* adding ruff formatting
* fixing several tests
* formatting with ruff
* adding positional encoder changes and tests
* adding ruff suggestions
* changes added by python utils/check_copies.py --fix_and_overwrite
* removing pos_encoding added by script
* adding interpolation to clipseg
* formatting
* adding further testing to altclip and better documentation to kosmos2
* skipping test_inputs_embeds_matches_input_ids_with_generate in git model
* fixing clipseg comment suggestions
* fixing bridgetower test
* fixing altclip tensor output POS test
* adding ruff formatting
* fixing several tests
* formatting with ruff
* adding right pretrained model
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* fixing test_inference_image_segmentation
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* fixing test_inference_interpolate_pos_encoding for the git model as there is no vision_model_output
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* adding ruff formatting
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* adding new interpolate_pos_encoding function
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* fixing interpolate_POS funciton
* adapting output tensor in teests
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* modifying output tensor
* [run_slow] altclip, bridgetower, chinese_clip, clip, clipseg, git, kosmos2, x_clip
* adding the correct tensor
* [run_slow] clipseg
* fixing spaces
* [run_slow] clipseg
* [run_slow] clipseg
---------
Co-authored-by: Manuel Sanchez Hernandez <manuel.sanchez.hernandez@schibsted.com>