Skip to content

Commit

Permalink
Modified cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil authored and nikhil committed Nov 4, 2024
1 parent f7bd1ef commit 243070d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lotus/models/lm.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import logging
from functools import lru_cache
import numpy as np
from typing import Any

import litellm
import numpy as np
from litellm import batch_completion, completion_cost
from litellm.caching import Cache
from litellm.caching import Cache, LiteLLMCacheType
from litellm.types.utils import ChatCompletionTokenLogprob, Choices, ModelResponse
from litellm.utils import token_counter
from openai import OpenAIError
from tokenizers import Tokenizer

import lotus
import logging
from functools import lru_cache
from lotus.types import LMOutput, LMStats, LogprobsForCascade, LogprobsForFilterCascade

litellm.cache = Cache(disk_cache_dir=".lotus_cache", type="disk")
litellm.cache = Cache(disk_cache_dir=".lotus_cache", type=LiteLLMCacheType.DISK)

class LM:
def __init__(
Expand Down

0 comments on commit 243070d

Please sign in to comment.