29Aug


There are several reasons why one might choose to use this approach:

Simplified Reproducibility: Fine-tuning a model with input/output pairs for reproducibility allows you to offload much of the complexity and software infrastructure to OpenAI.

This means that the data, along with the seed reference, is embedded within the model itself, streamlining administration and ensuring availability.

Precision in Use Cases: By using seeding, you can precisely target different fine-tuned datasets for various user scenarios.

This enables more tailored and consistent responses depending on the specific context in which the model is being used.

Fine-tuning can also be versioned, and if a newer version of the data is used for fine-tuning, this can be tracked via fine-tuning.

Inference Segmentation: Inference can be segmented into two categories: general information and specific information on which the model is fine-tuned.

This allows the model to distinguish between providing broad, generalised responses and delivering more precise answers based on the specialised training it has received.

Considerations

Fine-tuned models that have already been created from these base models will not be affected by this deprecation.

However, you will no longer be able to create new fine-tuned versions using these models.

Although this approach is appealing due to its simplicity and no-code nature, it does create model dependency, making it difficult to migrate to another model or AI provider.

The advantage of a RAG (Retrieval-Augmented Generation) framework is that it offers a degree of model independence, allowing AI models to be treated more like interchangeable utilities.

This flexibility can simplify transitions between different models or providers, reducing the risk of being locked into a single ecosystem.

Large Language Models primarily rely on unstructured natural language input and generate output through Natural Language Generation (NLG).

A key aspect of fine-tuning, as with RAG, is to provide the Language Model with contextual reference during inference.

This process is known as In-Context Learning (ICL). ICL enables the Language Model to temporarily set aside its base knowledge and instead leverage the specific contextual data supplied, allowing for more accurate and relevant responses based on the given context.

Below is Python code you can copy as-is and paste into a notebook. You can see the question is asked, What is X? and without the necessary context, this question is very ambiguous.

pip install -q openai
#####
import os
#####
os.environ['OPENAI_API_KEY'] = str("")

#####
from openai import OpenAI
client = OpenAI()

response = client.chat.completions.create(
model="gpt-4o-mini-2024-07-18",
messages=[
{
"role": "system",
"content": "You should help to user to answer on his question."
},
{
"role": "user",
"content": "What is X?"
}
],
temperature=1,
max_tokens=150,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
seed=1
)
print(response)

Therefore, considering the output from the gpt-4o-mini-2024–07–18 model, the model is attempting to disambiguate the input by casting the question into different contexts.

This process involves analysing the question to identify multiple potential interpretations, allowing the model to respond more accurately based on the inferred context.

ChatCompletion(id='chatcmpl-A1UX0BcHnsoy7EPnRUqJHp4F0CToW', 
choices=[Choice(finish_reason='length',
index=0, logprobs=None,
message=ChatCompletionMessage(content='The question "What is X?"
is quite broad and can refer to many things depending on the context.
Here are a few possibilities:\n\n1.

**Mathematics**: In an equation, X often represents an unknown variable
that needs to be solved.\n2.

**Algebra**: X can be a placeholder for any
number in algebraic expressions.\n3.

**Science**: X could refer to a
variable in experiments or a certain element in chemistry (like X-rays).\n4.
**Popular culture**: X could refer to a character, a title, or a brand name
(like "X-Men" or "X-Factor").\n5.

**Programming**: In computer science, X might stand for a parameter or a
specific data type', refusal=None, role='assistant',

function_call=None, tool_calls=None))],
created=1724919054,
model='gpt-4o-mini-2024-07-18',
object='chat.completion',
service_tier=None,
system_fingerprint='fp_5bd87c427a',
usage=CompletionUsage(completion_tokens=150, prompt_tokens=26, total_tokens=176))

However, below is a snippet from the training data where the context of X is defined…



Source link

Protected by Security by CleanTalk