{"record":{"id":"1e0d1e8a62e29a89","repo":"binary-husky/gpt_academic","slug":"jittorllms-1e0d1e","errorCode":null,"errorMessage":"不能正常加载jittorllms的参数！","messagePattern":"不能正常加载jittorllms的参数！","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"request_llms/bridge_jittorllms_rwkv.py","lineNumber":65,"sourceCode":"            root_dir_assume = os.path.abspath(os.path.dirname(__file__) +  '/..')\n            os.chdir(root_dir_assume + '/request_llms/jittorllms')\n            sys.path.append(root_dir_assume + '/request_llms/jittorllms')\n        validate_path() # validate path so you can run from base directory\n\n        def load_model():\n            import types\n            try:\n                if self.jittorllms_model is None:\n                    device = get_conf('LOCAL_MODEL_DEVICE')\n                    from .jittorllms.models import get_model\n                    # available_models = [\"chatglm\", \"pangualpha\", \"llama\", \"chatrwkv\"]\n                    args_dict = {'model': 'chatrwkv'}\n                    print('self.jittorllms_model = get_model(types.SimpleNamespace(**args_dict))')\n                    self.jittorllms_model = get_model(types.SimpleNamespace(**args_dict))\n                    print('done get model')\n            except:\n                self.child.send('[Local Message] Call jittorllms fail 不能正常加载jittorllms的参数。')\n                raise RuntimeError(\"不能正常加载jittorllms的参数！\")\n        print('load_model')\n        load_model()\n\n        # 进入任务等待状态\n        print('进入任务等待状态')\n        while True:\n            # 进入任务等待状态\n            kwargs = self.child.recv()\n            query = kwargs['query']\n            history = kwargs['history']\n            # 是否重置\n            if len(self.local_history) > 0 and len(history)==0:\n                print('触发重置')\n                self.jittorllms_model.reset()\n            self.local_history.append(query)\n\n            print('收到消息，开始请求')\n            try:","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/binary-husky/gpt_academic/blob/d6bde0fa54373309bd05823a49bda8da019d2c77/request_llms/bridge_jittorllms_rwkv.py#L47-L83","documentation":"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.","triggerScenarios":"First load of local chatrwkv: jittorllms submodule/deps missing, RWKV checkpoint download failure, CUDA/Jittor init error, wrong LOCAL_MODEL_DEVICE.","commonSituations":"Environment without the jittorllms assets, offline machine, driver/Jittor mismatch, insufficient VRAM for the RWKV weights.","solutions":["Run `python -c \"from request_llms.jittorllms.models import get_model; import types; get_model(types.SimpleNamespace(model='chatrwkv'))\"` to surface the real error.","Install jittorllms requirements and ensure the RWKV weights download completes (network/disk).","Check LOCAL_MODEL_DEVICE and GPU memory; try cpu to smoke-test.","Prefer a maintained RWKV runtime (e.g. rwkv.cpp / ChatRWKV directly) over the legacy jittorllms bridge."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"def jittorllms_available(model: str) -> bool:\n    try:\n        from request_llms.jittorllms.models import get_model  # noqa\n        return True\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    handle = GetGLMHandle()\nexcept RuntimeError as e:\n    if 'jittorllms' in str(e):\n        log.error('chatrwkv load failed: %s', e)","preventionTips":["Pre-fetch RWKV weights; verify disk space","Smoke-test get_model(model='chatrwkv') in isolation","Prefer maintained RWKV runtimes over the legacy jittorllms bridge"],"tags":["jittorllms","rwkv","local-model","startup","model-loading"],"backgroundTag":null,"analyzedSha":"d6bde0fa54373309bd05823a49bda8da019d2c77","analyzedAt":"2026-08-14T22:48:35.038Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}