feat: add speculative decoding

This commit is contained in:
jialin
2025-11-03 10:14:30 +08:00
parent 608b2e31c7
commit 3613fb3f69
15 changed files with 356 additions and 165 deletions
+12
View File
@@ -42,6 +42,9 @@ export const FormContext = React.createContext<FormContextProps>(
{} as FormContextProps
);
/**
* Catalog form context
*/
export const CatalogFormContext = React.createContext<CatalogFormContextProps>(
{} as CatalogFormContextProps
);
@@ -50,6 +53,10 @@ export const FormOuterContext = React.createContext<FormOuterContextProps>(
{} as FormOuterContextProps
);
/**
* Hooks to use the form context
*/
export const useFormContext = () => {
const context = React.useContext(FormContext);
if (!context) {
@@ -68,6 +75,11 @@ export const useCatalogFormContext = () => {
return context;
};
/**
*
* Hooks to use the outer form context
*/
export const useFormOuterContext = () => {
const context = React.useContext(FormOuterContext);
if (!context) {