Autotrain ORPO Error 500

Hi everyone!

I am currently trying to fine-tune the Llama 3.1 8B Instruct model using ORPO.
Unfortunately, I receive a 500 error (see below the Logs).

Settings

  • LLM ORPO
  • Standard Parameters (no changes made)
  • Column mapping according to dataset (i.e. prompt, text, rejected_text)
  • Upload of local CSV file

What I tried

A single prompt-text-rejected_text-set might look like this:

prompt text rejected_text
Wie beeinflusst die Salzkonzentration im Boden das Wachstum von Pflanzen? Welche Pflanzenarten untersuchen Sie und wie werden Sie die Salzkonzentration und das Wachstum messen? Salz ist generell schlecht für Pflanzen also wird das Wachstum gehemmt.

I am fairly new to this, perhaps someone has an idea how to go forward to be able to fine-tune the model using ORPO? Might it have to do with using German language in the training set?

Cheers!
P.s.: Does someone know how to delete the logs to clean it up after a test? :smiley:

KeyError: ‘text’

raise KeyError(key) from err

File “/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py”, line 3812, in get_loc

indexer = self.columns.get_loc(key)

File “/app/env/lib/python3.10/site-packages/pandas/core/frame.py”, line 4102, in getitem

train_df.loc[:, “autotrain_text”] = train_df[self.text_column]

File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 293, in prepare_columns

train_df, valid_df = self.prepare_columns(train_df, valid_df)

File “/app/env/lib/python3.10/site-packages/autotrain/preprocessor/text.py”, line 311, in prepare

return preprocessor.prepare()

File “/app/env/lib/python3.10/site-packages/autotrain/dataset.py”, line 570, in prepare

data_path = dset.prepare()

File “/app/env/lib/python3.10/site-packages/autotrain/app/ui_routes.py”, line 645, in handle_form

return await dependant.call(**values)

File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 191, in run_endpoint_function

raw_response = await run_endpoint_function(

File “/app/env/lib/python3.10/site-packages/fastapi/routing.py”, line 278, in app

response = await func(request)

File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 72, in app

await app(scope, receive, sender)

File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app

raise exc

File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 64, in wrapped_app

await wrap_app_handling_exceptions(app, request)(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 77, in app

await self.app(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 297, in handle

await route.handle(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 776, in app

await self.middleware_stack(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/routing.py”, line 756, in call

await app(scope, receive, sender)

File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app

raise exc

File “/app/env/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 64, in wrapped_app

await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 65, in call

await self.app(scope, receive, send_wrapper)

File “/app/env/lib/python3.10/site-packages/starlette/middleware/sessions.py”, line 85, in call

await self.app(scope, receive, _send)

File “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 164, in call

raise exc

File “/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 186, in call

await self.middleware_stack(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/starlette/applications.py”, line 123, in call

await super().call(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/fastapi/applications.py”, line 1054, in call

return await self.app(scope, receive, send)

File “/app/env/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py”, line 69, in call

result = await app( # type: ignore[func-returns-value]

File “/app/env/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py”, line 411, in run_asgi

Traceback (most recent call last):

The above exception was the direct cause of the following exception:

KeyError: ‘text’

File “pandas/_libs/hashtable_class_helper.pxi”, line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item

File “pandas/_libs/hashtable_class_helper.pxi”, line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item

File “index.pyx”, line 196, in pandas._libs.index.IndexEngine.get_loc

File “index.pyx”, line 167, in pandas._libs.index.IndexEngine.get_loc

return self._engine.get_loc(casted_key)

File “/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py”, line 3805, in get_loc

Traceback (most recent call last):

ERROR: Exception in ASGI application

INFO | 2024-10-08 21:29:58 | autotrain.app.ui_routes:handle_form:629 - Column mapping: {‘prompt’: ‘prompt’, ‘text’: ‘text’, ‘rejected_text’: ‘rejected_text’}

INFO | 2024-10-08 21:29:58 | autotrain.app.ui_routes:handle_form:628 - Task: lm_training

INFO | 2024-10-08 21:29:58 | autotrain.app.ui_routes:handle_form:500 - hardware: local-ui

INFO | 2024-10-08 21:29:28 | autotrain.app.ui_routes:fetch_params:391 - Param distributed_backend not found in UI_PARAMS

INFO | 2024-10-08 21:29:28 | autotrain.app.ui_routes:fetch_params:381 - Task: llm:orpo

INFO | 2024-10-08 21:29:26 | autotrain.app.ui_routes:fetch_params:391 - Param distributed_backend not found in UI_PARAMS

INFO | 2024-10-08 21:29:26 | autotrain.app.ui_routes:fetch_params:381 - Task: llm:sft

INFO: 10.16.3.138:58147 - “GET / HTTP/1.1” 307 Temporary Redirect

INFO: 10.16.3.138:58147 - “GET / HTTP/1.1” 307 Temporary Redirect

INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)

INFO: Application startup complete.

INFO: Waiting for application startup.

INFO: Started server process [73]

INFO | 2024-10-08 21:29:24 | autotrain.app.app::24 - AutoTrain started successfully

INFO | 2024-10-08 21:29:24 | autotrain.app.app::23 - AutoTrain version: 0.8.21

INFO | 2024-10-08 21:29:24 | autotrain.app.app::13 - Starting AutoTrain…

INFO | 2024-10-08 21:29:24 | autotrain.app.ui_routes::298 - AutoTrain started successfully

INFO | 2024-10-08 21:29:22 | autotrain.app.ui_routes::32 - Starting AutoTrain…

1 Like

I don’t know if this will help, but I found an article that might be helpful.

Thanks John,
I had hoped to skip the coding part - and read this article a few weeks ago as well. Probably will just go back to this :wink:

Thanks for your effort :slight_smile:

1 Like