PS C:\Users\Administrator> ollama -h Large language model runner
Usage: ollama [flags] ollama [command]
Available Commands: serve Start ollama create Create a model from a Modelfile show Show information for a model run Run a model stop Stop a running model pull Pull a model from a registry push Push a model to a registry list List models ps List running models cp Copy a model rm Remove a model help Help about any command
Flags: -h, --helphelpfor ollama -v, --version Show version information
Use "ollama [command] --help"for more information about a command. PS C:\Users\Administrator>
PS C:\Users\Administrator> ollama run deepseek-r1 >>> 1+2+3+4+54654+213=? <think> To solve the equation \(1 + 2 + 3 + 4 + 54654 + 213\), I will follow these steps:
First, add the numbers from 1 to 4.
Next, add the result to 54654.
Finally, add this sum to 213 to get the final answer. </think>
To solve the equation \(1 + 2 + 3 + 4 + 54654 + 213\), follow these steps:
PS C:\Users\Administrator\Documents\GitHub\Janus> python demo/app_januspro.py Python version is above 3.10, patching the collections module. C:\Users\Administrator\Documents\GitHub\Janus\.venv\lib\site-packages\torchvision\datapoints\__init__.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning(). warnings.warn(_BETA_TRANSFORMS_WARNING) C:\Users\Administrator\Documents\GitHub\Janus\.venv\lib\site-packages\torchvision\transforms\v2\__init__.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning(). warnings.warn(_BETA_TRANSFORMS_WARNING) C:\Users\Administrator\Documents\GitHub\Janus\.venv\lib\site-packages\transformers\models\auto\image_processing_auto.py:590: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use `slow_image_processor_class`, or `fast_image_processor_class` instead warnings.warn( config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.28k/1.28k [00:00<?, ?B/s] pytorch_model.bin.index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 89.0k/89.0k [00:00<00:00, 252kB/s] model.safetensors.index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 92.8k/92.8k [00:00<00:00, 243kB/s] pytorch_model-00001-of-00002.bin: 0%| | 10.5M/9.99G [00:02<33:41, 4.94MB/s] pytorch_model-00001-of-00002.bin: 2%|█▋ | 157M/9.99G [00:13<11:13, 14.6MB/s] 。。。。。。。。。。。。。。。。。。 tokenizer_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 285/285 [00:00<00:00, 272kB/s] tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.72M/4.72M [00:00<00:00, 7.59MB/s] special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 344/344 [00:00<?, ?B/s] You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be setif you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message. processor_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [00:00<?, ?B/s] Some kwargs in processor config are unused and will not have any effect: ignore_id, add_special_token, num_image_tokens, mask_prompt, image_tag, sft_format. Running on local URL: http://127.0.0.1:7860 IMPORTANT: You are using gradio version 3.48.0, however version 4.44.1 is available, please upgrade. -------- Running on public URL: https://8f307516dd497d1b07.gradio.live
This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
install 过程需要 VPN ,没有VPN 报下来类似的报错
1 2
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like deepseek-ai/Janus-Pro-7B is not the path to a directory containing a file named preprocessor_config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
上传图片识别报错
1 2 3 4 5 6
File "C:\Users\Administrator\Documents\GitHub\Janus\demo\app_januspro.py", line 58, in multimodal_understanding inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs) File "C:\Users\Administrator\Documents\GitHub\Janus\janus\models\modeling_vlm.py", line 246, in prepare_inputs_embeds images_embeds = self.aligner(self.vision_model(images)) 。。。。。。。。。。。。。。。。。。。。。。。。。 RuntimeError: "slow_conv2d_cpu" not implemented for'Half'
# vl2-tiny, 3.37B-MoE in total, activated 1B, can be run on a single GPU < 40GB CUDA_VISIBLE_DEVICES=2 python web_demo.py \ --model_name "deepseek-ai/deepseek-vl2-tiny" \ --port 37914
# vl2-small, 16.1B-MoE in total, activated 2.4B # If run on A100 40GB GPU, you need to set the `--chunk_size 512` for incremental prefilling for saving memory and it might be slow. # If run on > 40GB GPU, you can ignore the `--chunk_size 512` for faster response. CUDA_VISIBLE_DEVICES=2 python web_demo.py \ --model_name "deepseek-ai/deepseek-vl2-small" \ --port 37914 \ --chunk_size 512
PS C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2> python web_demo.py --model_name "deepseek-ai/deepseek-vl2-tiny" --port 37914 Python version is above 3.10, patching the collections module. C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: '[WinError 127] 找不到指定的程序。'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source? warn( WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.6.0+cu124 with CUDA 1204 (you have 2.6.0+cpu) Python 3.10.11 (you have 3.10.11) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details deepseek-ai/deepseek-vl2-tiny is loading... C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py:795: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`. warnings.warn( tokenizer_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 165k/165k [00:00<00:00, 412kB/s] tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.27M/6.27M [00:01<00:00, 6.26MB/s] special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 801/801 [00:00<?, ?B/s] Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. processor_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.23k/1.23k [00:00<?, ?B/s] Add pad token = ['<|▁pad▁|>'] to the tokenizer <|▁pad▁|>:2 Add image token = ['<image>'] to the tokenizer <image>:128815 Add grounding-related tokens = ['<|ref|>', '<|/ref|>', '<|det|>', '<|/det|>', '<|grounding|>'] to the tokenizer with input_ids <|ref|>:128816 <|/ref|>:128817 <|det|>:128818 <|/det|>:128819 <|grounding|>:128820 Add chat tokens = ['<|User|>', '<|Assistant|>'] to the tokenizer with input_ids <|User|>:128821 <|Assistant|>:128822 config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.29k/2.29k [00:00<00:00, 2.29MB/s] model.safetensors.index.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 247k/247k [00:00<00:00, 5.26MB/s] Downloading shards: 0%| | 0/1 [00:00<?, ?it/s] model-00001-of-000001.safetensors: 11%|█████████████████████
Traceback (most recent call last): File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 662, in <module> demo = build_demo(args) File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 471, in build_demo fetch_model(args.model_name) File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 143, in fetch_model DEPLOY_MODELS[model_name] = load_model(model_path, dtype=dtype) File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\deepseek_vl2\serve\inference.py", line 44, in load_model vl_gpt = vl_gpt.cuda().eval() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\modeling_utils.py", line 2528, in cuda return super().cuda(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1053, in cuda return self._apply(lambda t: t.cuda(device)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 903, in _apply module._apply(fn) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 903, in _apply module._apply(fn) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 903, in _apply module._apply(fn) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 930, in _apply param_applied = fn(param) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1053, in <lambda> return self._apply(lambda t: t.cuda(device)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda\__init__.py", line 310, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled PS C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2>
PS C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2> python web_demo.py --model_name "deepseek-ai/deepseek-vl2-tiny" --port 37914 Python version is above 3.10, patching the collections module. A matching Triton is not available, some optimizations will not be enabled 。。。。。。。。。。。。。。。。。。。。。。
Load deepseek-ai/deepseek-vl2-tiny successfully... IMPORTANT: You are using gradio version 3.48.0, however version 4.44.1 is available, please upgrade. -------- Traceback (most recent call last): File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 662, in <module> demo = build_demo(args) File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 582, in build_demo examples=format_examples(examples_list), File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\web_demo.py", line 577, in format_examples examples.append([images, display_example(images), texts]) File "C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2\deepseek_vl2\serve\app_modules\utils.py", line 319, in display_example image = Image.open(img_path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py", line 3431, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator\\Documents\\GitHub\\DeepSeek-VL2\\images\\mi_2.jpeg'
PS C:\Users\Administrator\Documents\GitHub\DeepSeek-VL2> python web_demo.py --model_name "deepseek-ai/deepseek-vl2-tiny" --port 37914 ............................. Load deepseek-ai/deepseek-vl2-tiny successfully... IMPORTANT: You are using gradio version 3.48.0, however version 4.44.1 is available, please upgrade. -------- Reloading javascript... Running on local URL: http://0.0.0.0:37914 Running on public URL: https://55c3f30e0730a00cc1.gradio.live
This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)