binary-husky/gpt_academic · critical · RuntimeError

不能正常加载jittorllms的参数!

Error message

不能正常加载jittorllms的参数!

What it means

Loader failure for the ChatRWKV variant of JittorLLMs: get_model(types.SimpleNamespace(model='chatrwkv')) raised in the loader subprocess; the bare except sends '[Local Message] Call jittorllms fail' to the parent and re-raises RuntimeError('不能正常加载jittorllms的参数!'), hiding the original exception.

Source

Thrown at request_llms/bridge_jittorllms_rwkv.py:65

            root_dir_assume = os.path.abspath(os.path.dirname(__file__) +  '/..')
            os.chdir(root_dir_assume + '/request_llms/jittorllms')
            sys.path.append(root_dir_assume + '/request_llms/jittorllms')
        validate_path() # validate path so you can run from base directory

        def load_model():
            import types
            try:
                if self.jittorllms_model is None:
                    device = get_conf('LOCAL_MODEL_DEVICE')
                    from .jittorllms.models import get_model
                    # available_models = ["chatglm", "pangualpha", "llama", "chatrwkv"]
                    args_dict = {'model': 'chatrwkv'}
                    print('self.jittorllms_model = get_model(types.SimpleNamespace(**args_dict))')
                    self.jittorllms_model = get_model(types.SimpleNamespace(**args_dict))
                    print('done get model')
            except:
                self.child.send('[Local Message] Call jittorllms fail 不能正常加载jittorllms的参数。')
                raise RuntimeError("不能正常加载jittorllms的参数!")
        print('load_model')
        load_model()

        # 进入任务等待状态
        print('进入任务等待状态')
        while True:
            # 进入任务等待状态
            kwargs = self.child.recv()
            query = kwargs['query']
            history = kwargs['history']
            # 是否重置
            if len(self.local_history) > 0 and len(history)==0:
                print('触发重置')
                self.jittorllms_model.reset()
            self.local_history.append(query)

            print('收到消息,开始请求')
            try:

View on GitHub (pinned to d6bde0fa54)

Solutions

  1. Run `python -c "from request_llms.jittorllms.models import get_model; import types; get_model(types.SimpleNamespace(model='chatrwkv'))"` to surface the real error.
  2. Install jittorllms requirements and ensure the RWKV weights download completes (network/disk).
  3. Check LOCAL_MODEL_DEVICE and GPU memory; try cpu to smoke-test.
  4. Prefer a maintained RWKV runtime (e.g. rwkv.cpp / ChatRWKV directly) over the legacy jittorllms bridge.
Defensive patterns

Strategy: validation

Validate before calling

def jittorllms_available(model: str) -> bool:
    try:
        from request_llms.jittorllms.models import get_model  # noqa
        return True
    except Exception:
        return False

Try / catch

try:
    handle = GetGLMHandle()
except RuntimeError as e:
    if 'jittorllms' in str(e):
        log.error('chatrwkv load failed: %s', e)

Prevention

When it happens

Trigger: First load of local chatrwkv: jittorllms submodule/deps missing, RWKV checkpoint download failure, CUDA/Jittor init error, wrong LOCAL_MODEL_DEVICE.

Common situations: Environment without the jittorllms assets, offline machine, driver/Jittor mismatch, insufficient VRAM for the RWKV weights.

Related errors


AI-assisted analysis of binary-husky/gpt_academic@d6bde0fa54 (2026-08-14). Data as JSON: /api/errors/1e0d1e8a62e29a89. Report an issue: GitHub.