Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

[FEATURE] Model Construct #304

Open
chandralegend opened this issue Mar 24, 2024 · 0 comments
Open

[FEATURE] Model Construct #304

chandralegend opened this issue Mar 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chandralegend
Copy link
Contributor

Describe the idea
Model construct allows nice way of initializing models in your jac program

Traditionally, You have to have a class that specifies the Model loading and forward function. This will bring methods specifically designed for inference __infer__ , __train_step__, __train__ etc.

For the Case of With LLM,

import:plugin from "@jaclang/llm", OpenAI;

model llm: OpenAI {
    has temperature = 0.7;
}

can genai_ability(input: str) -> int by llm(reason=True);

will translate into

# Import the OpenAI Base Class

llm = _Jac.Model(OpenAI(temperature=0.7))

# genai_ability uses llm.__infer__
@chandralegend chandralegend added the enhancement New feature or request label Mar 24, 2024
@kugesan1105 kugesan1105 linked a pull request Mar 25, 2024 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants