mistralai / mistral-inference

Official inference library for Mistral models
https://mistral.ai/
Apache License 2.0
9.16k stars 804 forks source link

[BUG: Mistral 7B Instruct Models from Huggingface limited to 4096tokens? #182

Open MaxS3552284 opened 3 weeks ago

MaxS3552284 commented 3 weeks ago

Python -VV

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[29], line 1
----> 1 python -VV

NameError: name 'python' is not defined

not working in sagemaker studio notebook?

Pip Freeze

aiobotocore==2.13.0
aiohttp==3.9.5
aioitertools==0.11.0
aiosignal==1.3.1
alabaster @ file:///home/conda/feedstock_root/build_artifacts/alabaster_1704848697227/work
annotated-types @ file:///home/conda/feedstock_root/build_artifacts/annotated-types_1696634205638/work
anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1708355285029/work
appdirs @ file:///home/conda/feedstock_root/build_artifacts/appdirs_1603108395799/work
archspec @ file:///home/conda/feedstock_root/build_artifacts/archspec_1699370045702/work
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1692818318753/work
argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1695386546427/work
arrow @ file:///home/conda/feedstock_root/build_artifacts/arrow_1696128962909/work
asgiref @ file:///home/conda/feedstock_root/build_artifacts/asgiref_1711268871457/work
astroid @ file:///home/conda/feedstock_root/build_artifacts/astroid_1695739484762/work
astropy @ file:///home/conda/feedstock_root/build_artifacts/astropy_1711552963707/work
astropy-iers-data @ file:///home/conda/feedstock_root/build_artifacts/astropy-iers-data_1713182991850/work
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work
async-lru @ file:///home/conda/feedstock_root/build_artifacts/async-lru_1690563019058/work
async-timeout==4.0.3
atomicwrites @ file:///home/conda/feedstock_root/build_artifacts/atomicwrites_1657325823582/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1704011227531/work
Authlib==1.3.0
Automat @ file:///home/conda/feedstock_root/build_artifacts/automat_1667331175863/work
autopep8 @ file:///home/conda/feedstock_root/build_artifacts/autopep8_1693061251004/work
autovizwidget==0.20.4
awscli==1.32.84
Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1702422572539/work
bcrypt @ file:///home/conda/feedstock_root/build_artifacts/bcrypt_1702663837948/work
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1705564648255/work
binaryornot==0.4.4
black @ file:///home/conda/feedstock_root/build_artifacts/black-recipe_1713169757064/work
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1696630167146/work
blinker @ file:///home/conda/feedstock_root/build_artifacts/blinker_1698890160476/work
bokeh @ file:///home/conda/feedstock_root/build_artifacts/bokeh_1712901085037/work
boltons @ file:///home/conda/feedstock_root/build_artifacts/boltons_1703154663129/work
boto3==1.34.84
botocore==1.34.84
Brotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1695989787169/work
brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1695621686607/work
cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work
certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1707022139797/work/certifi
cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1696001684923/work
chardet @ file:///home/conda/feedstock_root/build_artifacts/chardet_1695468598188/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1698833585322/work
click @ file:///home/conda/feedstock_root/build_artifacts/click_1692311806742/work
cloudpickle==2.2.1
colorama==0.4.4
colorcet @ file:///home/conda/feedstock_root/build_artifacts/colorcet_1709713288616/work
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1710320294760/work
conda @ file:///home/conda/feedstock_root/build_artifacts/conda_1701731572133/work
conda-content-trust @ file:///home/conda/feedstock_root/build_artifacts/conda-content-trust_1693490762241/work
conda-libmamba-solver @ file:///home/conda/feedstock_root/build_artifacts/conda-libmamba-solver_1702406360642/work/src
conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1691048088238/work
conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1691009212940/work
constantly==15.1.0
contextlib2==21.6.0
contourpy @ file:///home/conda/feedstock_root/build_artifacts/contourpy_1712429905637/work
cookiecutter @ file:///home/conda/feedstock_root/build_artifacts/cookiecutter_1708608886262/work
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography-split_1708780263085/work
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1696677705766/work
cytoolz @ file:///home/conda/feedstock_root/build_artifacts/cytoolz_1706897049115/work
daal4py==2024.3.0
dask @ file:///home/conda/feedstock_root/build_artifacts/dask-core_1712248465271/work
dask-expr @ file:///home/conda/feedstock_root/build_artifacts/dask-expr_1712693819397/work
datasets==2.20.0
debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1707444420542/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
diff-match-patch @ file:///home/conda/feedstock_root/build_artifacts/diff-match-patch_1683670697993/work
dill @ file:///home/conda/feedstock_root/build_artifacts/dill_1706434688412/work
distributed @ file:///home/conda/feedstock_root/build_artifacts/distributed_1712327504625/work
distro @ file:///home/conda/feedstock_root/build_artifacts/distro_1675116244235/work
Django @ file:///home/conda/feedstock_root/build_artifacts/django_1712162937871/work
docker==6.1.3
docstring-to-markdown @ file:///home/conda/feedstock_root/build_artifacts/docstring-to-markdown_1708563025188/work
docutils==0.16
dparse==0.6.4b0
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work
et-xmlfile @ file:///home/conda/feedstock_root/build_artifacts/et_xmlfile_1674664118162/work
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1704921103267/work
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1698579936712/work
fastapi @ file:///home/conda/feedstock_root/build_artifacts/fastapi_1712541010133/work
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1703780968325/work/dist
filelock==3.13.4
flake8 @ file:///home/conda/feedstock_root/build_artifacts/flake8_1704483779980/work
Flask @ file:///home/conda/feedstock_root/build_artifacts/flask_1692686107036/work
fonttools @ file:///home/conda/feedstock_root/build_artifacts/fonttools_1712344558731/work
fqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1638810296540/work/dist
frozenlist==1.4.1
fsspec==2024.6.0
future @ file:///home/conda/feedstock_root/build_artifacts/future_1708610096684/work
gevent @ file:///home/conda/feedstock_root/build_artifacts/gevent_1696750251337/work
gmpy2 @ file:///home/conda/feedstock_root/build_artifacts/gmpy2_1666808654411/work
google-pasta==0.2.0
greenlet @ file:///home/conda/feedstock_root/build_artifacts/greenlet_1703201576006/work
gssapi @ file:///home/conda/feedstock_root/build_artifacts/python-gssapi_1697143962561/work
h11 @ file:///home/conda/feedstock_root/build_artifacts/h11_1664132893548/work
h2 @ file:///home/conda/feedstock_root/build_artifacts/h2_1634280454336/work
h5py @ file:///home/conda/feedstock_root/build_artifacts/h5py_1712763600515/work
hdijupyterutils==0.20.4
holoviews @ file:///home/conda/feedstock_root/build_artifacts/holoviews_1707758049702/work
hpack==4.0.0
httpcore @ file:///home/conda/feedstock_root/build_artifacts/httpcore_1711596990900/work
httpx @ file:///home/conda/feedstock_root/build_artifacts/httpx_1708530890843/work
huggingface-hub==0.23.4
hyperframe @ file:///home/conda/feedstock_root/build_artifacts/hyperframe_1619110129307/work
hyperlink @ file:///home/conda/feedstock_root/build_artifacts/hyperlink_1610092164190/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1701026962277/work
imagecodecs @ file:///home/conda/feedstock_root/build_artifacts/imagecodecs_1712887497562/work
imageio @ file:///home/conda/feedstock_root/build_artifacts/imageio_1707730027807/work
imagesize @ file:///home/conda/feedstock_root/build_artifacts/imagesize_1656939531508/work
importlib-metadata==6.11.0
importlib_resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1711040877059/work
incremental @ file:///home/conda/feedstock_root/build_artifacts/incremental_1665859450441/work
inflection @ file:///home/conda/feedstock_root/build_artifacts/inflection_1598089801258/work
iniconfig @ file:///home/conda/feedstock_root/build_artifacts/iniconfig_1673103042956/work
intervaltree @ file:///home/conda/feedstock_root/build_artifacts/intervaltree_1683532206518/work
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1708996548741/work
ipython==8.23.0
ipython-genutils==0.2.0
ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1631590360471/work
isoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1638811571363/work/dist
isort @ file:///home/conda/feedstock_root/build_artifacts/isort_1702518492027/work
itsdangerous @ file:///home/conda/feedstock_root/build_artifacts/itsdangerous_1648147185463/work
jaraco.classes @ file:///home/conda/feedstock_root/build_artifacts/jaraco.classes_1712041970955/work
jaraco.context @ file:///home/conda/feedstock_root/build_artifacts/jaraco.context_1675258691127/work
jaraco.functools @ file:///home/conda/feedstock_root/build_artifacts/jaraco.functools_1701695162614/work
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1696326070614/work
jeepney @ file:///home/conda/feedstock_root/build_artifacts/jeepney_1649085214306/work
jellyfish @ file:///home/conda/feedstock_root/build_artifacts/jellyfish_1700261197714/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1704966972576/work
jmespath==1.0.1
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1712597192451/work
json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1712986206667/work
jsonpatch @ file:///home/conda/feedstock_root/build_artifacts/jsonpatch_1695536281965/work
jsonpointer @ file:///home/conda/feedstock_root/build_artifacts/jsonpointer_1695397238043/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1705707496704/work
jsonschema-specifications @ file:///tmp/tmpkv1z7p57/src
jupyter @ file:///home/conda/feedstock_root/build_artifacts/jupyter_1696255489086/work
jupyter-console @ file:///home/conda/feedstock_root/build_artifacts/jupyter_console_1678118109161/work
jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/jupyter_events_1710805637316/work
jupyter-lsp @ file:///home/conda/feedstock_root/build_artifacts/jupyter-lsp-meta_1712707420468/work/jupyter-lsp
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1673615989977/work
jupyter_core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1710257277185/work
jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1712884210432/work
jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1710262634903/work
jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1712586972478/work
jupyterlab_pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1707149102966/work
jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server-split_1712583928460/work
jupyterlab_widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1707421892171/work
keyring @ file:///home/conda/feedstock_root/build_artifacts/keyring_1712107862727/work
kiwisolver @ file:///home/conda/feedstock_root/build_artifacts/kiwisolver_1695379902431/work
krb5 @ file:///home/conda/feedstock_root/build_artifacts/pykrb5_1708557570437/work
lazy-object-proxy @ file:///home/conda/feedstock_root/build_artifacts/lazy-object-proxy_1702663550721/work
libmambapy @ file:///home/conda/feedstock_root/build_artifacts/mamba-split_1702310393080/work/libmambapy
lief==0.14.1
linkify-it-py @ file:///home/conda/feedstock_root/build_artifacts/linkify-it-py_1707129103613/work
llvmlite==0.42.0
locket @ file:///home/conda/feedstock_root/build_artifacts/locket_1650660393415/work
lxml @ file:///home/conda/feedstock_root/build_artifacts/lxml_1704724217654/work
lz4 @ file:///home/conda/feedstock_root/build_artifacts/lz4_1704831084136/work
mamba @ file:///home/conda/feedstock_root/build_artifacts/mamba-split_1702310393080/work/mamba
Markdown @ file:///home/conda/feedstock_root/build_artifacts/markdown_1710435156458/work
markdown-it-py @ file:///home/conda/feedstock_root/build_artifacts/markdown-it-py_1686175045316/work
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1706899921127/work
marshmallow==3.21.1
matplotlib @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-suite_1712605966339/work
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1660814786464/work
mccabe @ file:///home/conda/feedstock_root/build_artifacts/mccabe_1643049622439/work
mdit-py-plugins @ file:///home/conda/feedstock_root/build_artifacts/mdit-py-plugins_1686175351422/work
mdurl @ file:///home/conda/feedstock_root/build_artifacts/mdurl_1704317613764/work
menuinst @ file:///home/conda/feedstock_root/build_artifacts/menuinst_1702317041727/work
mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1673904152039/work
mock @ file:///home/conda/feedstock_root/build_artifacts/mock_1689092066756/work
more-itertools @ file:///home/conda/feedstock_root/build_artifacts/more-itertools_1704738417589/work
mpmath @ file:///home/conda/feedstock_root/build_artifacts/mpmath_1678228039184/work
msgpack @ file:///home/conda/feedstock_root/build_artifacts/msgpack-python_1700926504817/work
multidict==6.0.5
multiprocess==0.70.16
munkres==1.1.4
mypy-extensions @ file:///home/conda/feedstock_root/build_artifacts/mypy_extensions_1675543315189/work
nb_conda_kernels @ file:///home/conda/feedstock_root/build_artifacts/nb_conda_kernels_1708439411368/work
nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1683202081046/work
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1710317608672/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1660222578365/work
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1712238998817/work
nest-asyncio==1.5.5
nltk @ file:///home/conda/feedstock_root/build_artifacts/nltk_1672696305909/work
nose @ file:///home/conda/feedstock_root/build_artifacts/nose_1602434998960/work
notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1695225629675/work
notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1707957777232/work
numba @ file:///home/conda/feedstock_root/build_artifacts/numba_1711475179870/work
numexpr @ file:///home/conda/feedstock_root/build_artifacts/numexpr_1707139868047/work
numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1707225380409/work/dist/numpy-1.26.4-cp310-cp310-linux_x86_64.whl#sha256=51131fd8fc130cd168aecaf1bc0ea85f92e8ffebf211772ceb16ac2e7f10d7ca
numpydoc @ file:///home/conda/feedstock_root/build_artifacts/numpydoc_1711638311008/work
openpyxl @ file:///home/conda/feedstock_root/build_artifacts/openpyxl_1695464693876/work
overrides @ file:///home/conda/feedstock_root/build_artifacts/overrides_1706394519472/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1696202382185/work
pandas @ file:///home/conda/feedstock_root/build_artifacts/pandas_1712782027765/work
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
panel @ file:///home/conda/feedstock_root/build_artifacts/panel_1712673484427/work
papermill==2.5.0
param @ file:///home/conda/feedstock_root/build_artifacts/param_1711102884605/work
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1712320355065/work
partd @ file:///home/conda/feedstock_root/build_artifacts/partd_1695667515973/work
pathos==0.3.2
pathspec @ file:///home/conda/feedstock_root/build_artifacts/pathspec_1702249949303/work
patsy @ file:///home/conda/feedstock_root/build_artifacts/patsy_1704469236901/work
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1706113125309/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1712154467551/work
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1694617248815/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1701708255999/work
plotly @ file:///home/conda/feedstock_root/build_artifacts/plotly_1708020413888/work
pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1706116770704/work
ply @ file:///home/conda/feedstock_root/build_artifacts/ply_1712242996588/work
pox==0.3.4
ppft==1.7.6.8
prometheus_client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1707932675456/work
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1702399386289/work
protobuf==4.25.3
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1705722392846/work
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work
pure-sasl @ file:///home/conda/feedstock_root/build_artifacts/pure-sasl_1631890804823/work
pyarrow==15.0.2
pyarrow-hotfix @ file:///home/conda/feedstock_root/build_artifacts/pyarrow-hotfix_1700596371886/work
pyasn1 @ file:///home/conda/feedstock_root/build_artifacts/pyasn1_1713209357222/work
pyasn1_modules @ file:///home/conda/feedstock_root/build_artifacts/pyasn1-modules_1713209683338/work
pycodestyle @ file:///home/conda/feedstock_root/build_artifacts/pycodestyle_1697202867721/work
pycosat @ file:///home/conda/feedstock_root/build_artifacts/pycosat_1696355758174/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
pydantic @ file:///home/conda/feedstock_root/build_artifacts/pydantic_1712899199321/work
pydantic_core @ file:///home/conda/feedstock_root/build_artifacts/pydantic-core_1712848713126/work
pydocstyle @ file:///home/conda/feedstock_root/build_artifacts/pydocstyle_1673997487070/work
pyerfa @ file:///home/conda/feedstock_root/build_artifacts/pyerfa_1712963310236/work
pyflakes @ file:///home/conda/feedstock_root/build_artifacts/pyflakes_1704424584912/work
pyfunctional==1.5.0
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1700607939962/work
PyHive @ file:///home/conda/feedstock_root/build_artifacts/pyhive_1692318104998/work
pylint @ file:///home/conda/feedstock_root/build_artifacts/pylint_1696171682664/work
pylint-venv @ file:///home/conda/feedstock_root/build_artifacts/pylint-venv_1698219336631/work
pyls-spyder @ file:///home/conda/feedstock_root/build_artifacts/pyls-spyder_1619747398504/work
pyodbc @ file:///home/conda/feedstock_root/build_artifacts/pyodbc_1707165112197/work
pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1706660063483/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1709721012883/work
PyQt5==5.15.9
PyQt5-sip==12.12.2
PyQtWebEngine==5.15.4
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work
pyspnego @ file:///home/conda/feedstock_root/build_artifacts/pyspnego_1696277744607/work
pytest @ file:///home/conda/feedstock_root/build_artifacts/pytest_1709992573517/work
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1709299778482/work
python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1677079630776/work
python-lsp-black @ file:///home/conda/feedstock_root/build_artifacts/python-lsp-black_1702956932456/work
python-lsp-jsonrpc @ file:///home/conda/feedstock_root/build_artifacts/python-lsp-jsonrpc_1695528365348/work
python-lsp-server @ file:///home/conda/feedstock_root/build_artifacts/python-lsp-server-meta_1710340750771/work
python-slugify @ file:///home/conda/feedstock_root/build_artifacts/python-slugify-split_1707425621764/work
pytoolconfig @ file:///home/conda/feedstock_root/build_artifacts/pytoolconfig_1675124745143/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1706886791323/work
pyviz_comms @ file:///home/conda/feedstock_root/build_artifacts/pyviz_comms_1708965518207/work
pyxdg @ file:///home/conda/feedstock_root/build_artifacts/pyxdg_1654536799286/work
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1695373428874/work
pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1666828497229/work
QDarkStyle @ file:///home/conda/feedstock_root/build_artifacts/qdarkstyle_1702957860620/work
qstylizer @ file:///home/conda/feedstock_root/build_artifacts/qstylizer_1662244505808/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl
QtAwesome @ file:///home/conda/feedstock_root/build_artifacts/qtawesome_1678418951316/work
qtconsole @ file:///home/conda/feedstock_root/build_artifacts/qtconsole-base_1700168901209/work
QtPy @ file:///home/conda/feedstock_root/build_artifacts/qtpy_1698112029416/work
referencing @ file:///home/conda/feedstock_root/build_artifacts/referencing_1710763696991/work
regex @ file:///home/conda/feedstock_root/build_artifacts/regex_1703393490683/work
requests==2.32.3
requests-kerberos @ file:///home/conda/feedstock_root/build_artifacts/requests-kerberos_1708339520234/work
rfc3339-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1638811747357/work
rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work
rich @ file:///home/conda/feedstock_root/build_artifacts/rich-split_1709150387247/work/dist
rope @ file:///home/conda/feedstock_root/build_artifacts/rope_1711296293824/work
rpds-py @ file:///home/conda/feedstock_root/build_artifacts/rpds-py_1707922703488/work
rsa==4.7.2
Rtree @ file:///home/conda/feedstock_root/build_artifacts/rtree_1705697867335/work
ruamel-yaml-conda @ file:///home/conda/feedstock_root/build_artifacts/ruamel_yaml_1695546328261/work
ruamel.yaml @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml_1699007337104/work
ruamel.yaml.clib @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml.clib_1695996839082/work
s3fs==2024.6.0
s3transfer==0.10.1
safety-schemas==0.0.2
sagemaker==2.223.0
sagemaker-data-insights @ https://files.pythonhosted.org/packages/70/8b/7c964508afe1dc3535422df8383c022c762c1f1254acb68b29d26b33fe30/sagemaker_data_insights-0.3.3-py3-none-any.whl#sha256=b1368073adb0360c2bcee6edf011758c00ecfc0b1b1a8032f787618f87b9b1d0
sagemaker-datawrangler @ https://files.pythonhosted.org/packages/6a/29/6d3da0518cbe72647b164bbdee23f4df3936cf5691fff9b29dc8714115ff/sagemaker_datawrangler-0.4.3-py3-none-any.whl#sha256=724467ef4c8204f2e6ecc6e5bc39a29dfe5b50657aec901becb7a7c207a06c25
sagemaker-headless-execution-driver==0.0.13
sagemaker-scikit-learn-extension==2.5.0
sagemaker-studio-analytics-extension==0.0.20
sagemaker-studio-sparkmagic-lib==0.1.4
sasl==0.3.1
schema==0.7.5
scikit-learn @ file:///home/conda/feedstock_root/build_artifacts/scikit-learn_1712824576633/work
scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy-split_1712255231550/work/dist/scipy-1.13.0-cp310-cp310-linux_x86_64.whl#sha256=2d847580321887e90df63c23a59deb5edd129fd9b3b34ff76d61cc32872a00ac
seaborn @ file:///home/conda/feedstock_root/build_artifacts/seaborn-split_1706340836595/work
SecretStorage @ file:///home/conda/feedstock_root/build_artifacts/secretstorage_1695551734488/work
Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1712584999685/work
service-identity @ file:///home/conda/feedstock_root/build_artifacts/service-identity-build_1700936484042/work
shellingham==1.5.4
sip @ file:///home/conda/feedstock_root/build_artifacts/sip_1697300428978/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smclarify==0.5
smdebug-rulesconfig==1.0.1
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1708952932303/work
snowballstemmer @ file:///home/conda/feedstock_root/build_artifacts/snowballstemmer_1637143057757/work
sortedcontainers @ file:///home/conda/feedstock_root/build_artifacts/sortedcontainers_1621217038088/work
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1693929250441/work
sparkmagic @ file:///home/conda/feedstock_root/build_artifacts/sparkmagic_1675108208766/work/sparkmagic
Sphinx @ file:///home/conda/feedstock_root/build_artifacts/sphinx_1694647393084/work
sphinxcontrib-applehelp @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-applehelp_1705126298355/work
sphinxcontrib-devhelp @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-devhelp_1705126010477/work
sphinxcontrib-htmlhelp @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-htmlhelp_1705118152391/work
sphinxcontrib-jsmath @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-jsmath_1691604704163/work
sphinxcontrib-qthelp @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-qthelp_1705126152907/work
sphinxcontrib-serializinghtml @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-serializinghtml_1705118225549/work
spyder @ file:///home/conda/feedstock_root/build_artifacts/spyder_1710687055121/work
spyder-kernels @ file:///home/conda/feedstock_root/build_artifacts/spyder-kernels_1709087656711/work
SQLAlchemy @ file:///home/conda/feedstock_root/build_artifacts/sqlalchemy_1711289771385/work
sqlparse @ file:///home/conda/feedstock_root/build_artifacts/sqlparse_1681817562700/work
stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work
starlette @ file:///home/conda/feedstock_root/build_artifacts/starlette-recipe_1709667058396/work
statsmodels @ file:///home/conda/feedstock_root/build_artifacts/statsmodels_1702575356319/work
sympy @ file:///home/conda/feedstock_root/build_artifacts/sympy_1684180540116/work
tabulate @ file:///home/conda/feedstock_root/build_artifacts/tabulate_1665138452165/work
tblib @ file:///home/conda/feedstock_root/build_artifacts/tblib_1702066284995/work
tenacity @ file:///home/conda/feedstock_root/build_artifacts/tenacity_1692026804430/work
terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1710262609923/work
text-unidecode @ file:///home/conda/feedstock_root/build_artifacts/text-unidecode_1694707102786/work
textdistance @ file:///home/conda/feedstock_root/build_artifacts/textdistance_1663527496115/work
threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1710943558485/work
three-merge @ file:///home/conda/feedstock_root/build_artifacts/three-merge_1595515817927/work
thrift @ file:///home/conda/feedstock_root/build_artifacts/thrift_1711156094832/work/lib/py
thrift-sasl @ file:///home/conda/feedstock_root/build_artifacts/thrift_sasl_1664049052220/work
tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1666100256010/work
toml @ file:///home/conda/feedstock_root/build_artifacts/toml_1604308577558/work
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work
tomlkit @ file:///home/conda/feedstock_root/build_artifacts/tomlkit_1709043728182/work
toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1706112571092/work
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1708363098266/work
tqdm==4.66.4
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1710254411456/work
truststore @ file:///home/conda/feedstock_root/build_artifacts/truststore_1694154605758/work
Twisted @ file:///home/conda/feedstock_root/build_artifacts/twisted_1709332269679/work
typer==0.12.3
types-python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/types-python-dateutil_1710589910274/work
typing-utils @ file:///home/conda/feedstock_root/build_artifacts/typing_utils_1622899189314/work
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1712329955671/work
tzdata @ file:///home/conda/feedstock_root/build_artifacts/python-tzdata_1707747584337/work
uc-micro-py @ file:///home/conda/feedstock_root/build_artifacts/uc-micro-py_1707507364877/work
ujson @ file:///home/conda/feedstock_root/build_artifacts/ujson_1702256697606/work
unicodedata2 @ file:///home/conda/feedstock_root/build_artifacts/unicodedata2_1695847980273/work
uri-template @ file:///home/conda/feedstock_root/build_artifacts/uri-template_1688655812972/work/dist
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1708239446578/work
w3lib @ file:///home/conda/feedstock_root/build_artifacts/w3lib_1691236459676/work
watchdog @ file:///home/conda/feedstock_root/build_artifacts/watchdog_1707295131798/work
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1704731205417/work
webcolors @ file:///home/conda/feedstock_root/build_artifacts/webcolors_1679900785843/work
webencodings @ file:///home/conda/feedstock_root/build_artifacts/webencodings_1694681268211/work
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1701630677416/work
Werkzeug @ file:///home/conda/feedstock_root/build_artifacts/werkzeug_1699492457596/work
whatthepatch @ file:///home/conda/feedstock_root/build_artifacts/whatthepatch_1683396758362/work
widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1637174134114/work
wrapt @ file:///home/conda/feedstock_root/build_artifacts/wrapt_1699532811524/work
wurlitzer @ file:///home/conda/feedstock_root/build_artifacts/wurlitzer_1669944596833/work
xlrd @ file:///home/conda/feedstock_root/build_artifacts/xlrd_1610224409810/work
xxhash==3.4.1
xyzservices @ file:///home/conda/feedstock_root/build_artifacts/xyzservices_1712209912887/work
yapf @ file:///home/conda/feedstock_root/build_artifacts/yapf_1690387939953/work
yarl==1.9.4
zict @ file:///home/conda/feedstock_root/build_artifacts/zict_1681770155528/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1695255097490/work
zope.event @ file:///home/conda/feedstock_root/build_artifacts/zope.event_1687705558811/work
zope.interface @ file:///home/conda/feedstock_root/build_artifacts/zope.interface_1712940893298/work
zstandard==0.22.0
Note: you may need to restart the kernel to use updated packages.

Reproduction Steps

recently i finetuned a Mistral 7B Instruct v0.3 model and deployed it on an AWS Sagemaker endpoint. But got errors like this during inference in the sagemaker studio notebook:

" Received client error (422) from primary with message "{"error":"Input validation error: inputs tokens + max_new_tokens must be <= 4096. Given: 877 inputs tokens and 4096 max_new_tokens","error_type":"validation"}"."

Which means I am limited to 4096 Tokens. But max. tokens should be the following: Mistral 7B Instruct v0.1 = 8192 Mistral 7B Instruct v0.2,v0.3 = 32k

Input parameter were: "parameters": {"max_new_tokens": 4096, "do_sample": True}

I also hosted the basemodels from huggingface on sagemaker endpoints and they all seem to be limited to 4096 tokens.

Does anyone know how to fix this?

Expected Behavior

During inference the token limits should be far higher than 4k. Under 4k inference works as intended.

Additional Context

I got the code for deployment on AWS Sagemaker from here: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3

Suggested Solutions

No response

MaxS3552284 commented 3 weeks ago

Okay, I figured it out.

First, I tested all model and fine-tuning parameters with 4096 as the value, which were quite a few since everything is a multiple of 512. This didn’t do anything, so it was a bust. After figuring out that this mostly means the error lies with the deployment container, I at least had a hint. After lengthy Googling, it turned into a jackpot :)

So, for anyone with similar problems, here is how you do it: Instead of using the deployment functions as listed on the Huggingface page of the Mistral-7B-Instruct model, I used the functions as written here: https://github.com/aws-samples/Mistral-7B-Instruct-fine-tune-and-deploy-on-SageMaker/blob/main/Deploy_Mistral_7B_on_Amazon_SageMaker_with_vLLM.ipynb

Basically:

  1. Download your model.tar.gz (skip to step 3 if already unpacked).
  2. Unpack it.
  3. Generate a serving.properties file as described in the link above.
  4. Put it into the folder with the rest of the model files.
  5. Repack all files again into a model.tar.gz and upload it to your S3 bucket.
  6. Deploy the endpoint via the functions used in the link above.

Alternatively, I also found a link (https://github.com/awslabs/extending-the-context-length-of-open-source-llms/blob/main/MistralLite/sagemaker-tgi-custom/example_usage.ipynb) describing how to modify the Huggingface environment, which also probably does the trick, but I didn't get the container to run yet. But I got one solution to work, so... meh~ ¯_(ツ)_/¯